From: Markus Schaber <schabios@logi-track.com>
To: pgsql-performance@postgresql.org
Cc: Steven Rosenstein <srosenst@us.ibm.com>
Subject: Re: Can the V7.3 EXPLAIN ANALYZE be trusted?
Date: Mon, 07 Feb 2005 15:39:15 +0100
Message-ID: <42077D93.4000104@logi-track.com> (raw)
In-Reply-To: <87lla1iago.fsf@stark.xeocode.com>
References: <BF88DF69D9E2884B9BE5160DB2B97A85010D7046@nlshl-exch1.eu.uis.unisys.com>
<87lla1iago.fsf@stark.xeocode.com>
Hi, @all,
Greg Stark schrieb:
> "Leeuw van der, Tim" <tim.leeuwvander@nl.unisys.com> writes:
>
>>I don't think EXPLAIN ANALYZE puts that much overhead on a query.
>
> EXPLAIN ANALYZE does indeed impose a significant overhead.
Additional note:
In some rare cases, you can experience just the opposite effect, explain
analyze can be quicker then the actual query.
This is the case for rather expensive send/output functions, like the
PostGIS ones:
lwgeom=# \timing
Zeitmessung ist an.
lwgeom=# explain analyze select setsrid(geom,4326) from adminbndy1;
QUERY PLAN
-----------------------------------------------------------------------------------------------------------
Seq Scan on adminbndy1 (cost=0.00..4.04 rows=83 width=89) (actual
time=11.793..2170.184 rows=83 loops=1)
Total runtime: 2170.834 ms
(2 Zeilen)
Zeit: 2171,688 ms
lwgeom=# \o /dev/null
lwgeom=# select setsrid(geom,4326) from adminbndy1;
Zeit: 9681,001 ms
BTW: I use the cheap setsrid(geom,4326) to force deTOASTing of the
geometry column. Not using it seems to ignore TOASTed columns in
sequential scan simulation.)
lwgeom=# explain analyze select geom from adminbndy1;
QUERY PLAN
-------------------------------------------------------------------------------------------------------
Seq Scan on adminbndy1 (cost=0.00..3.83 rows=83 width=89) (actual
time=0.089..0.499 rows=83 loops=1)
Total runtime: 0.820 ms
(2 Zeilen)
Markus
--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com
Attachments:
signature.asc (application/pgp-signature, 255B) download
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: schabios@logi-track.com, srosenst@us.ibm.com
Subject: Re: Can the V7.3 EXPLAIN ANALYZE be trusted?
In-Reply-To: <42077D93.4000104@logi-track.com>
* 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