Re: Re-2: BUG #7495: chosen wrong index - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: Re-2: BUG #7495: chosen wrong index
Date
Msg-id 502CDD9602000025000497B7@gw.wicourts.gov
Whole thread Raw
In response to Re-2: BUG #7495: chosen wrong index  (psql@elbrief.de)
List pgsql-bugs
<psql@elbrief.de> wrote:

> In my live environment i have a table with a boolean where the
> boolean is usually true. The boolean is false on new or changed
> entrys and if i select the false-rows order by primary key i get
> slow querys. The table has a lot of million rows and a very small
> amount of rows with false.

That sure sounds like a situation where you should use a partial
index.

http://www.postgresql.org/docs/current/interactive/indexes-partial.html

-Kevin

pgsql-bugs by date:

Previous
From: Valentine Gogichashvili
Date:
Subject: Re: BUG #7494: WAL replay speed depends heavily on the shared_buffers size
Next
From: Tom Lane
Date:
Subject: Re: BUG #7485: 9.2 beta3 libxml2 can't be loaded on Windows