From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: psql@elbrief.de
To: pgsql-bugs@postgresql.org
Subject: Re: Re-2: BUG #7495: chosen wrong index
Date: Thu, 16 Aug 2012 11:46:30 -0500
Message-ID: <502CDD9602000025000497B7@gw.wicourts.gov> (raw)
In-Reply-To: <1345112066.AD21FD7F0.11678@debian2>
References: <502B75150200002500049751@gw.wicourts.gov>
<1345112066.AD21FD7F0.11678@debian2>
<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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, psql@elbrief.de
Subject: Re: Re-2: BUG #7495: chosen wrong index
In-Reply-To: <502CDD9602000025000497B7@gw.wicourts.gov>
References: <502B75150200002500049751@gw.wicourts.gov> <1345112066.AD21FD7F0.11678@debian2> <502CDD9602000025000497B7@gw.wicourts.gov>
* 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