how to use all the options of EXPLAIN?

From: AI Rumman <rummandba(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: how to use all the options of EXPLAIN?
Date: 2011-09-15 05:43:55
Message-ID: CAGoODpdr0JZKEVXw_wRc7t_zvbPApB7jq3HJOCT2-5tVfgP8eQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Could anyone please tell me how to use all the options of explain in
Postgresql 9.
http://www.postgresql.org/docs/9.0/static/sql-explain.html

I can use EXPLAIN ANALYZE.

FORMAT:

explain (format yaml) select * from tab1;
QUERY PLAN
---------------------------------------
- Plan: +
Node Type: "Seq Scan" +
Relation Name: "tab1"+
Alias: "tab1" +
Startup Cost: 0.00 +
Total Cost: 21558.94 +
Plan Rows: 1688234 +
Plan Width: 333
(1 row)

But

explain (format yaml) analyze select * from tab1;
ERROR: syntax error at or near "analyze"
LINE 1: explain (format yaml) analyze select * from tab1

BUFFERS:

explain (buffers true) select * from tab1;
ERROR: EXPLAIN option BUFFERS requires ANALYZE

But

explain (buffers true) analyze select * from tab1;
ERROR: syntax error at or near "analyze"
LINE 1: explain (buffers true) analyze select * from tab1...

Same for COSTS.

Does any of our experts use these options? If yes, please tell me how.

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Toby Corkindale 2011-09-15 05:59:20 Re: how to use all the options of EXPLAIN?
Previous Message Adarsh Sharma 2011-09-15 04:48:40 Re: pg_dump with select command