pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Jim C. Nasby <jim@nasby.net>
Cc: Dimitri Fontaine <dim@dalibo.com>
Cc: pgsql-performance@postgresql.org, Ioana Danes <ioanasoftware@yahoo.ca>
Subject: Re: Postgresql 8.1.4 - performance issues for select on
Date: Wed, 18 Oct 2006 19:05:17 -0400
Message-ID: <2694.1161212717@sss.pgh.pa.us> (raw)
In-Reply-To: <1161210735.31645.277.camel@dogma.v10.wvs>
References: <20061018210201.56435.qmail@web55907.mail.re3.yahoo.com>
	<200610182319.41920.dim@dalibo.com>
	<1161207230.31645.266.camel@dogma.v10.wvs>
	<20061018221046.GG85041@nasby.net>
	<1161210735.31645.277.camel@dogma.v10.wvs>

Jeff Davis <pgsql@j-davis.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



view thread (16+ messages)  latest in thread

Message-ID: <2694.1161212717@sss.pgh.pa.us>
Permalink:  ../2694.1161212717@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2694.1161212717@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql@j-davis.com, jim@nasby.net, dim@dalibo.com, ioanasoftware@yahoo.ca
  Subject: Re: Postgresql 8.1.4 - performance issues for select on
  In-Reply-To: <2694.1161212717@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox