| From: | Toby Corkindale <toby(dot)corkindale(at)strategicdata(dot)com(dot)au> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: how to use all the options of EXPLAIN? |
| Date: | 2011-09-15 05:59:20 |
| Message-ID: | 4E719438.3090903@strategicdata.com.au |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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;
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Siva Palanisamy | 2011-09-15 06:13:56 | How to return an array of values from a function? |
| Previous Message | AI Rumman | 2011-09-15 05:43:55 | how to use all the options of EXPLAIN? |