Re: Speeding query - Mailing list pgsql-general

From Tom Jenkins
Subject Re: Speeding query
Date
Msg-id 1019740649.12165.57.camel@asimov
Whole thread Raw
In response to Speeding query  (Uros Gruber <uros@sir-mag.com>)
List pgsql-general
On Wed, 2002-04-24 at 16:54, Uros Gruber wrote:
>
> select d.title from table1 d, table2 c where c.id_category='09' and d.id_entry=c.id_entry;
>
>
> I see that there is seq scan over 25k rows, how can i set
> indexes to make query faster and use indexes.
>

try setting an index on table2's id_entry.  your index on table2 is a
compound index with id_entry as the second field; so no indexes match
just table2's id_entry.
--

Tom Jenkins
Development InfoStructure
http://www.devis.com



pgsql-general by date:

Previous
From: Alban Médici
Date:
Subject: Plpgsql get record value without colunm name ???
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Help with performance