Re: Optimisation, index use question [long] - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Optimisation, index use question [long]
Date
Msg-id 20030713141134.GC16581@svana.org
Whole thread Raw
In response to Optimisation, index use question [long]  (Francois Suter <dba@paragraf.ch>)
Responses Re: Optimisation, index use question [long]
List 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@svana.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

Attachment

pgsql-general by date:

Previous
From: Francois Suter
Date:
Subject: Optimisation, index use question [long]
Next
From: Richard Welty
Date:
Subject: ./configure failing -- pgsql 7.3.3 install on solaris 8