Re: Postgres not using indices defined on my table with certain queries using "in"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "s anwar" <sanwar(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgres not using indices defined on my table with certain queries using "in"
Date: 2007-07-05 04:08:23
Message-ID: 3473.1183608503@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"s anwar" <sanwar(at)gmail(dot)com> writes:
> The two queries blow require radically different query times 1600ms vs 10ms:

Try not to be so fancy with a bunch of somewhat-overlapping partial indexes.
The planner is not so smart as you, and will not always be able to prove
to itself that it can use these indexes. A single, non-partial index on
ock would perform at least as well as this hodgepodge.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message mike lane 2007-07-05 10:33:15 how to get pg_dump in postgesql 8.2 to create inserts with E'....' for back slashes
Previous Message s anwar 2007-07-04 22:44:00 Postgres not using indices defined on my table with certain queries using "in"