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_timewould be blank!).
But I do like the idea…
Best,
David