From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Query Plan Columns |
Date: | 2010-11-09 08:12:06 |
Message-ID: | m2mxpi3oh5.fsf@2ndQuadrant.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"David E. Wheeler" <david(at)kineticode(dot)com> writes:
> I'm wondering if there's any reason why we couldn't have EXPLAIN do something like this itself in core:
>
> EXPLAIN (format table) SELECT * FROM bar;
+1 from me here, as it happens "parsing" a table-like resultset is
already implemented everywhere :)
I'd add another +1 if it were easily usable as a "normal" relation (or
SRF) from inside a query, e.g. in a WITH table expression.
WITH plan AS (
EXPLAIN (format table) SELECT * FROM bar
)
SELECT some_plan_analysis_query_here;
Or even:
WITH plan AS (
EXPLAIN (format table) SELECT * FROM bar
)
INSERT INTO plan_audit
SELECT * FROM plan
WHERE actual_total_time > 12 * interval '100 ms';
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2010-11-09 08:19:23 | Re: Query Plan Columns |
Previous Message | Pavel Stehule | 2010-11-09 07:01:05 | Re: proposal: plpgsql - iteration over fields of rec or row variable |