Re: RES: [SQL] Queries not using Index - Mailing list pgsql-general

From Stephan Szabo
Subject Re: RES: [SQL] Queries not using Index
Date
Msg-id 20020724081529.S36103-100000@megazone23.bigpanda.com
Whole thread Raw
In response to RES: [SQL] Queries not using Index  (Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>)
List pgsql-general
On Wed, 24 Jul 2002, Elielson Fontanezi wrote:

> Hi!
>
>     What kind of index is t2002_06_station_idx?
>     Have you done this SELECT command below, right?
>
>     select * from t2002_06 WHERE station = 'SAMI4';
>
>     This SELECT causes a sequention scan 'cause your index
> is not HASH type, but likely a BTREE one.
>     BTREE index is to interval searches (station = 'SAMI4%')
> not precise searchs. (station = 'SAMI4').


Btree indexes are happy being used for equality searches
in PostgreSQL as long as the optimizer thinks it's worth
it. Hash indexes are currently pretty broken, it's better
to just pretend they aren't there.




pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: Postgres 7.3
Next
From: Vince Vielhaber
Date:
Subject: Re: Postgres 7.3