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

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, robertmhaas(at)gmail(dot)com, 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-22 05:16:35
Message-ID: AANLkTinc6f4xgKPOQd59zzmephnhi_3XY=8qMtN9WjGV@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 22, 2011 at 4:35 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Reimplement planner's handling of MIN/MAX aggregate optimization (again).
>

I'm just curious, Why is this no longer an interesting special case?

--- this is an interesting special case as of 9.1
-explain (costs off)
- select min(unique2) from tenk1 where unique2 = 42;
- QUERY PLAN
------------------------------------------------
- Aggregate
- -> Index Scan using tenk1_unique2 on tenk1
- Index Cond: (unique2 = 42)

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-03-22 05:30:20 Re: Planner regression in 9.1: min(x) cannot use partial index with NOT NULL
Previous Message Vaibhav Kaushal 2011-03-22 03:39:56 Re: How to look at the Expression Trees