From: Artur Zając <azajac@ang.com.pl>
To: pgsql-performance@postgresql.org
Subject: Re: Difference between explain analyze and real execution time
Date: Mon, 15 Nov 2010 16:24:30 +0100
Message-ID: <008e01cb84d9$33797a80$9a6c6f80$@ang.com.pl> (raw)
In-Reply-To: <13814.1289833979@sss.pgh.pa.us>
References: <000001cb849e$1dce2720$596a7560$@ang.com.pl>
<13814.1289833979@sss.pgh.pa.us>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: azajac@ang.com.pl
Subject: Re: Difference between explain analyze and real execution time
In-Reply-To: <008e01cb84d9$33797a80$9a6c6f80$@ang.com.pl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox