pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jim@nasby.net
Cc: pgsql-performance@postgresql.org
Subject: Re: Partial index where clause not filtering through
Date: Mon, 16 Jun 2003 10:11:00 -0400
Message-ID: <2619.1055772660@sss.pgh.pa.us> (raw)
In-Reply-To: <20030616012456.U66185@flake.decibel.org>
References: <20030616003118.S66185@flake.decibel.org>
	<26793.1055742214@sss.pgh.pa.us>
	<20030616012456.U66185@flake.decibel.org>

"Jim C. Nasby" <jim@nasby.net> writes:
> Well, it would only need to make the checks if the table had partial
> indexes. Even then, it probably makes sense to only do the check if
> other query planning steps decide it would be useful to use the partial
> index.

You have that backwards.  Planning is bottom-up, so we have to determine
the relevant indexes *first*.  Accordingly, a partial index is a
performance drag on every query that uses its table, as we check to
see if the partial index qual is satisfied by the query's WHERE clause.
That's why I don't want it to be any slower than it is ...

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <2619.1055772660@sss.pgh.pa.us>
Permalink:  ../2619.1055772660@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2619.1055772660@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 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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jim@nasby.net
  Subject: Re: Partial index where clause not filtering through
  In-Reply-To: <2619.1055772660@sss.pgh.pa.us>
  References: <20030616003118.S66185@flake.decibel.org> <26793.1055742214@sss.pgh.pa.us> <20030616012456.U66185@flake.decibel.org> <2619.1055772660@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