how to use all the options of EXPLAIN? - Mailing list pgsql-general

From AI Rumman
Subject how to use all the options of EXPLAIN?
Date
Msg-id CAGoODpdr0JZKEVXw_wRc7t_zvbPApB7jq3HJOCT2-5tVfgP8eQ@mail.gmail.com
Whole thread Raw
Responses Re: how to use all the options of EXPLAIN?  (Toby Corkindale <toby.corkindale@strategicdata.com.au>)
List 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.

pgsql-general by date:

Previous
From: Adarsh Sharma
Date:
Subject: Re: pg_dump with select command
Next
From: Toby Corkindale
Date:
Subject: Re: how to use all the options of EXPLAIN?