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

From Toby Corkindale
Subject Re: how to use all the options of EXPLAIN?
Date
Msg-id 4E719438.3090903@strategicdata.com.au
Whole thread Raw
In response to how to use all the options of EXPLAIN?  (AI Rumman <rummandba@gmail.com>)
Responses Re: how to use all the options of EXPLAIN?  (AI Rumman <rummandba@gmail.com>)
List pgsql-general
On 15/09/11 15:43, AI Rumman wrote:
> 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.
> explain     (format yaml)   select * from tab1;
>
> 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.


Try putting the ANALYZE inside the parentheses..
eg
EXPLAIN (buffers true, analyze) select * from tab1;

pgsql-general by date:

Previous
From: AI Rumman
Date:
Subject: how to use all the options of EXPLAIN?
Next
From: Siva Palanisamy
Date:
Subject: How to return an array of values from a function?