From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
Cc: Daryl Herzmann <akrherz@iastate.edu>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: RES: [SQL] Queries not using Index
Date: Wed, 24 Jul 2002 08:18:06 -0700 (PDT)
Message-ID: <20020724081529.S36103-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <A799F7647794D311924A005004ACEA97080DDE89@cprodamibs249.prodam>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, ElielsonF@prodam.sp.gov.br, akrherz@iastate.edu, pgsql-general@postgresql.org
Subject: Re: RES: [SQL] Queries not using Index
In-Reply-To: <20020724081529.S36103-100000@megazone23.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox