From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Optimising queries involving unions |
Date: | 2005-05-26 18:02:36 |
Message-ID: | 3883.1117130556@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
> Tom Lane wrote:
>> It'd be nice to fix this someday, but don't hold your breath ...
> Is it even worth me thinking about trying to figure out how to make
> the current code do this sort of thing?
Probably not :-(. What we need is to integrate UNION (and the other
set-ops) into the normal querytree structure so that the planner can
consider alternative plans within its existing framework. That requires
some fundamental changes in the Query structure --- in particular, we
have to get rid of the current situation that there is exactly one
targetlist per rangetable. Decoupling targetlists and rangetables would
have some other benefits too (INSERT ... SELECT would get a lot cleaner)
but it's a wide-ranging change, and I think could only usefully be
tackled by someone who is already pretty familiar with the code.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-05-26 18:31:57 | Re: Specific query performance problem help requested - postgresql 7.4 |
Previous Message | Brad Might | 2005-05-26 17:55:32 | Specific query performance problem help requested - postgresql 7.4 |