Re: Difference between explain analyze and real execution time - Mailing list pgsql-performance

From Artur Zając
Subject Re: Difference between explain analyze and real execution time
Date
Msg-id 008e01cb84d9$33797a80$9a6c6f80$@ang.com.pl
Whole thread Raw
In response to Re: Difference between explain analyze and real execution time  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
> EXPLAIN ANALYZE doesn't account for all of the runtime involved.  In this
case, I'd bet that session startup/shutdown is a big part of the difference.
>
>            regards, tom lane

Does session startup/shutdown depend on tables used in query? Some simpler
query:

time psql  -c 'explain analyze SELECT te.idt FROM t_positions AS te    WHERE
te.idtr IN (347186)'

                                                             QUERY PLAN
----------------------------------------------------------------------------
---------------------------------------------------------
 Index Scan using tg_transelem_index1 on tg_transelem te  (cost=0.00..8.43
rows=3 width=4) (actual time=0.130..0.134 rows=3 loops=1)
   Index Cond: (tr_idtrans = 347186)
 Total runtime: 0.211 ms


real    0m0.017s
user    0m0.002s
sys     0m0.004s



-------------------------------------------
Artur Zajac




pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Difference between explain analyze and real execution time
Next
From: Tobias Brox
Date:
Subject: Re: Difference between explain analyze and real execution time