Skip site navigation (1) Skip section navigation (2)

Re: Partial index where clause not filtering through

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jim(at)nasby(dot)net
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Partial index where clause not filtering through
Date: 2003-06-16 14:11:00
Message-ID: 2619.1055772660@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Jim C. Nasby" <jim(at)nasby(dot)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

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2003-06-16 14:17:43
Subject: Re: 7.3 vs 7.2 - different query plan, bad performance
Previous:From: Ryszard LachDate: 2003-06-16 13:55:21
Subject: Re: 7.3 vs 7.2 - different query plan, bad performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group