pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Michael Monnerie <michael.monnerie@is.it-management.at>
Cc: pgsql-admin@postgresql.org
Subject: Re: Question on Index usage
Date: Wed, 21 Jan 2009 10:25:38 -0500
Message-ID: <2116.1232551538@sss.pgh.pa.us> (raw)
In-Reply-To: <20090121142829.GE4038@alvh.no-ip.org>
References: <200901210854.28091@zmi.at>
	<20090121142829.GE4038@alvh.no-ip.org>

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Seems like the problem is that it is not pushing the "status IN"
> condition as part of the index condition for some reason, and instead
> using it as a filter.  Maybe something to do with the selectivity of
> that clause?

No, AFAIR the planner will *always* include every possibly relevant
condition for a given index.  If the condition is useless or nearly so,
that might prompt it to pick a different index instead, but not to omit
the indexqual.  I'm thinking it's not believing it can use the status
condition with that index, perhaps for datatype reasons.  What is status
declared as, exactly?

Also, what PG version is this?

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <2116.1232551538@sss.pgh.pa.us>
Permalink:  ../2116.1232551538@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2116.1232551538@sss.pgh.pa.us

 · 

reply

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, michael.monnerie@is.it-management.at
  Subject: Re: Question on Index usage
  In-Reply-To: <2116.1232551538@sss.pgh.pa.us>

* 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