Re: explain analyze taking longer than executing the query?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: explain analyze taking longer than executing the query?
Date: 2006-11-17 04:01:22
Message-ID: 5875.1163736082@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> What am I missing about EXPLAIN ANALYZE that is causing that much
> overhead?

Instrumentation overhead? In this case you've got 2 million more
gettimeofday() calls in the one case than the other, which says that
gettimeofday() takes about 1 microsecond on your machine, which is not
too surprising for typical consumer PC gear. See discussions in the
pghackers archives back in May or so ... we tried to cut the overhead,
and failed miserably :-(

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arnaud Lesauvage 2006-11-17 08:48:24 pg_dump : option --exclude-schema not recognized
Previous Message Tom Lane 2006-11-17 03:49:50 Re: PostgreSQL: Question about rules