Re: Re-2: BUG #7495: chosen wrong index

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <psql(at)elbrief(dot)de>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Re-2: BUG #7495: chosen wrong index
Date: 2012-08-16 16:46:30
Message-ID: 502CDD9602000025000497B7@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

<psql(at)elbrief(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-08-16 17:46:33 Re: BUG #7485: 9.2 beta3 libxml2 can't be loaded on Windows
Previous Message Valentine Gogichashvili 2012-08-16 15:13:47 Re: BUG #7494: WAL replay speed depends heavily on the shared_buffers size