Re: Can the V7.3 EXPLAIN ANALYZE be trusted?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: "Leeuw van der, Tim" <tim(dot)leeuwvander(at)nl(dot)unisys(dot)com>
Cc: "Steven Rosenstein" <srosenst(at)us(dot)ibm(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Can the V7.3 EXPLAIN ANALYZE be trusted?
Date: 2005-02-06 22:34:47
Message-ID: 87lla1iago.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


"Leeuw van der, Tim" <tim(dot)leeuwvander(at)nl(dot)unisys(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-02-06 22:46:05 Re: Can the V7.3 EXPLAIN ANALYZE be trusted?
Previous Message Leeuw van der, Tim 2005-02-06 22:09:52 Re: Can the V7.3 EXPLAIN ANALYZE be trusted?