From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | hector Corrada Bravo <hcorrada(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: optimizer questions |
Date: | 2006-02-14 17:45:31 |
Message-ID: | 19880.1139939131@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
hector Corrada Bravo <hcorrada(at)gmail(dot)com> writes:
> 1) Regardless of the optimization problem, is the executor able to
> execute aggregate nodes within join trees (that is, not as the result
> of subqueries)?
Sure.
> 3) For debugging purposes: Has anyone figured out a way to feed
> hand-crafted plans to the executor? Setting up some of the data
> structures (PlannerInfo, target lists) etc. does not look trivial. By
> this I mean, beyond giving explicit join clauses in queries.
It's not really very practical --- the data structures are too complex
to create by hand in any reasonable way. You can probably test by
entering modified queries that do the aggregations in sub-selects,
though.
The most practical way to implement something like this is probably to
restructure the query during the "prep" stage, pushing the aggregates
down into sub-queries automatically. The 8.1 min/max optimization code
does something related, although I'll freely admit that's a bit of a hack.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | James William Pye | 2006-02-14 19:35:21 | Re: Copy From & Insert UNLESS |
Previous Message | Simon Riggs | 2006-02-14 17:20:55 | Patch Submission Guidelines |