Re: Planner regression in 9.1: min(x) cannot use partial index with NOT NULL

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <robertmhaas(at)gmail(dot)com>,<tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <marti(at)juffo(dot)org>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Planner regression in 9.1: min(x) cannot use partial index with NOT NULL
Date: 2011-03-21 16:22:10
Message-ID: 4D8734E2020000250003BBAE@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> Tom Lane wrote:

>> I don't think that suppressing nulls from an index this way is
>> really very useful. Using a partial index probably eats more
>> planner cycles than you'll save, overall.
>
> If only 1% of the table has non-NULL values in that column, maybe
> not.

We definitely have indexes with less than 1% non-NULL, and we've
found partial indexes to be efficient for them. On the other hand,
I can't think where we do min/max on any of them; so as long as this
regression only affects those aggregates, it won't hurt our shop.

The use case doesn't seem all that far-fetched to me, though.

-Kevin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yeb Havinga 2011-03-21 16:29:38 Re: Sync Rep and shutdown Re: Sync Rep v19
Previous Message Heikki Linnakangas 2011-03-21 16:00:42 Re: 2nd Level Buffer Cache