Re: MAX() and multi-column index on a partitioned table?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Johansen <davejohansen(at)gmail(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: MAX() and multi-column index on a partitioned table?
Date: 2015-05-22 22:42:16
Message-ID: 17857.1432334536@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Dave Johansen <davejohansen(at)gmail(dot)com> writes:
> I'm trying to call MAX() on the first value of a multi-column index of a
> partitioned table and the planner is choosing to do a sequential scan
> instead of an index scan. Is there something I can do to fix this?

What PG version are you using? 9.1 or newer should know how to do this
with a merge append of several indexscans.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Dave Johansen 2015-05-22 23:53:19 Re: MAX() and multi-column index on a partitioned table?
Previous Message Dave Johansen 2015-05-22 22:27:29 MAX() and multi-column index on a partitioned table?