X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BD3CA8B9D52 for ; Mon, 7 Feb 2005 14:39:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 69753-04 for ; Mon, 7 Feb 2005 14:39:19 +0000 (GMT) Received: from mail.logi-track.com (www.logi-track.com [213.239.193.212]) by svr1.postgresql.org (Postfix) with ESMTP id E126A8B9CF7 for ; Mon, 7 Feb 2005 14:39:22 +0000 (GMT) Received: from kingfisher.intern.logi-track.com (J2bc5.j.pppool.de [85.74.43.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logi-track.com (Postfix) with ESMTP id DE6EB306BE; Mon, 7 Feb 2005 15:39:25 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logi-track.com (Postfix) with ESMTP id 9065DAB100; Mon, 7 Feb 2005 15:39:19 +0100 (CET) Message-ID: <42077D93.4000104@logi-track.com> Date: Mon, 07 Feb 2005 15:39:15 +0100 From: Markus Schaber User-Agent: Mozilla Thunderbird 1.0 (X11/20050116) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Cc: Steven Rosenstein Subject: Re: Can the V7.3 EXPLAIN ANALYZE be trusted? References: <87lla1iago.fsf@stark.xeocode.com> In-Reply-To: <87lla1iago.fsf@stark.xeocode.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3BA70A022021BBE579081ACF" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/114 X-Sequence-Number: 10443 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3BA70A022021BBE579081ACF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Hi, @all, Greg Stark schrieb: > "Leeuw van der, Tim" 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 --------------enig3BA70A022021BBE579081ACF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCB32UOVWsnapT9i0RAs5RAJ9/5TukUze0SglIqboPhryqu4aohwCfQngV t/GQCGxd0Co1kmmVoAotU4M= =9jz5 -----END PGP SIGNATURE----- --------------enig3BA70A022021BBE579081ACF--