| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Wappler, Robert" <rwappler(at)ophardt(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Planner decisions |
| Date: | 2010-07-16 17:00:54 |
| Message-ID: | 18031.1279299654@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Wappler, Robert" <rwappler(at)ophardt(dot)com> writes:
> Attached is a query and its corresponding plan, where sorting of the CTE
> acts seems to be the bottle neck. It is a real execution plan captured
> with the auto_explain module.
There isn't a lot of intelligence about CTEs at the moment; in
particular I don't believe we have any provision for recognizing that
the output of a CTE is already sorted by anything the outer query would
recognize. The CTE is just a black box as far as the upper plan is
concerned.
In principle it's doable, I think, but nobody's spent much effort on
CTE optimization yet.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2010-07-16 17:14:25 | Re: Full Text Search dictionary issues |
| Previous Message | Tom Lane | 2010-07-16 16:40:08 | Re: pg_dump and --inserts / --column-inserts |