How to use EXPLAIN (TIMING) - Mailing list pgsql-hackers

From Robins Tharakan
Subject How to use EXPLAIN (TIMING)
Date
Msg-id CAEP4nAzWMzZ08Bzo4078VREXmEp0zP2f0xjP-pB1vb4XZtE3Uw@mail.gmail.com
Whole thread Raw
Responses Re: How to use EXPLAIN (TIMING)
List pgsql-hackers
Hi,

While creating regression tests for EXPLAIN I am (somehow) unable to get (TIMING) option to work with EXPLAIN!

I must be doing something stupid but all these options below just didn't work. Could someone point me to the right direction?

mpf2=# explain (TIMING) SELECT 1;
ERROR:  EXPLAIN option TIMING requires ANALYZE

mpf2=# EXPLAIN (TIMING FALSE) SELECT 1;
                QUERY PLAN
------------------------------------------
 Result  (cost=0.00..0.01 rows=1 width=0)
(1 row)

mpf2=# EXPLAIN ANALYSE (TIMING) SELECT 1;
ERROR:  syntax error at or near "TIMING"
LINE 1: EXPLAIN ANALYSE (TIMING) SELECT 1;
                         ^
mpf2=# EXPLAIN ANALYSE (TIMING TRUE) SELECT 1;
ERROR:  syntax error at or near "TIMING"
LINE 1: EXPLAIN ANALYSE (TIMING TRUE) SELECT 1;
                         ^
mpf2=# EXPLAIN ANALYSE TIMING TRUE SELECT 1;
ERROR:  syntax error at or near "TIMING"
LINE 1: EXPLAIN ANALYSE TIMING TRUE SELECT 1;
                        ^
mpf2=# EXPLAIN ANALYSE TIMING SELECT 1;
ERROR:  syntax error at or near "TIMING"
LINE 1: EXPLAIN ANALYSE TIMING SELECT 1;
                        ^
mpf2=# EXPLAIN TIMING ANALYSE SELECT 1;
ERROR:  syntax error at or near "TIMING"
LINE 1: EXPLAIN TIMING ANALYSE SELECT 1;
                ^
mpf2=# EXPLAIN (TIMING) ANALYSE SELECT 1;
ERROR:  syntax error at or near "ANALYSE"
LINE 1: EXPLAIN (TIMING) ANALYSE SELECT 1;
                         ^
mpf2=# EXPLAIN (TIMING) ANALYZE SELECT 1;
ERROR:  syntax error at or near "ANALYZE"
LINE 1: EXPLAIN (TIMING) ANALYZE SELECT 1;
                         ^
mpf2=# EXPLAIN (TIMING FALSE) ANALYZE SELECT 1;
ERROR:  syntax error at or near "ANALYZE"
LINE 1: EXPLAIN (TIMING FALSE) ANALYZE SELECT 1;
                               ^
mpf2=# SELECT version();
                                                   version

--------------------------------------------------------------------------------
------------------------------
 PostgreSQL 9.2.3 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.6 20120
305 (Red Hat 4.4.6-4), 64-bit
(1 row)


Thanks
--
Robins Tharakan

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PATCH] pg_regress and non-default unix socket path
Next
From: Andres Freund
Date:
Subject: Re: How to use EXPLAIN (TIMING)