From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Francois Suter <dba(at)paragraf(dot)ch> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Optimisation, index use question [long] |
Date: | 2003-07-13 14:11:34 |
Message-ID: | 20030713141134.GC16581@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, Jul 13, 2003 at 03:43:06PM +0200, Francois Suter wrote:
> Hi all,
>
> I am having my first try at optimizing the way queries are run on one of my
> databases and I'm having a few problems/questions.
Standard issue. When you specify an unquoted number in a query it's
interpreted as an int4 which doesn't match your indexes. Suggestions are:
- Put quotes around your numbers or eg. '1'
- Cast them to the right type eg. 1::bigint
Naturally you analysed, right?
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "the West won the world not by the superiority of its ideas or values or
> religion but rather by its superiority in applying organized violence.
> Westerners often forget this fact, non-Westerners never do."
> - Samuel P. Huntington
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Welty | 2003-07-13 14:22:04 | ./configure failing -- pgsql 7.3.3 install on solaris 8 |
Previous Message | Francois Suter | 2003-07-13 13:43:06 | Optimisation, index use question [long] |