Re: Query Plan Columns

David Wheeler <david@kineticode.com>

From: "David E. Wheeler" <david@kineticode.com>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-11-09T08:19:23Z
Lists: pgsql-hackers
On Nov 9, 2010, at 12:12 AM, Dimitri Fontaine wrote:

> WITH plan AS (
>  EXPLAIN (format table) SELECT * FROM bar
> )
> INSERT INTO plan_audit
> SELECT * FROM plan
> WHERE actual_total_time > 12 * interval '100 ms';

Yeah, that would be nice, but my current implementation has a row for each node, and a single explain can have many nodes. With this, you'd only get the top-level node (and not even that, as you didn't do EXPLAIN ANALYZE, so actual_total_time would be blank!).

But I do like the idea…

Best,

David