Re: Postgresql 8.1.4 - performance issues for select on

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, Dimitri Fontaine <dim(at)dalibo(dot)com>, pgsql-performance(at)postgresql(dot)org, Ioana Danes <ioanasoftware(at)yahoo(dot)ca>
Subject: Re: Postgresql 8.1.4 - performance issues for select on
Date: 2006-10-18 23:05:17
Message-ID: 2694.1161212717@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> If PostgreSQL could sort the result of a union by merging the results of
> two index scans, I think the problem would be solved. Is there something
> preventing this, or is it just something that needs to be added to the
> planner?

It's something on the wish-list. Personally I'd be inclined to try to
rewrite the query as a plain MAX() across rewritten per-table indexed
queries, rather than worry about mergesort or anything like that.
There wasn't any very good way to incorporate that idea when planagg.c
was first written, but now that the planner has an explicit notion of
"append relations" it might be relatively straightforward.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Davis 2006-10-18 23:05:49 Re: Postgresql 8.1.4 - performance issues for select on
Previous Message Tom Lane 2006-10-18 23:00:45 Re: index growth problem