pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Leeuw van der, Tim <tim.leeuwvander@nl.unisys.com>
Cc: Steven Rosenstein <srosenst@us.ibm.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Can the V7.3 EXPLAIN ANALYZE be trusted?
Date: 06 Feb 2005 17:34:47 -0500
Message-ID: <87lla1iago.fsf@stark.xeocode.com> (raw)
In-Reply-To: <BF88DF69D9E2884B9BE5160DB2B97A85010D7046@nlshl-exch1.eu.uis.unisys.com>
References: <BF88DF69D9E2884B9BE5160DB2B97A85010D7046@nlshl-exch1.eu.uis.unisys.com>


"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. What percentage of
the time is overhead depends heavily on how much i/o the query is doing.

For queries that are primarily cpu bound because they're processing data from
the cache it can be substantial. If all the data is in the shared buffers then
the gettimeofday calls for explain analyze can be just about the only syscalls
being executed and they're executed a lot.

It would be interesting to try to subtract out the profiling overhead from the
data like most profilers do. But it's not an easy thing to do since the times
are nested.

-- 
greg




view thread (6+ messages)  latest in thread

Message-ID: <87lla1iago.fsf@stark.xeocode.com>
Permalink:  ../87lla1iago.fsf@stark.xeocode.com/
Also on:    postgresql.org/message-id/87lla1iago.fsf@stark.xeocode.com

 · 

reply

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: gsstark@mit.edu, tim.leeuwvander@nl.unisys.com, srosenst@us.ibm.com
  Subject: Re: Can the V7.3 EXPLAIN ANALYZE be trusted?
  In-Reply-To: <87lla1iago.fsf@stark.xeocode.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