Re: EXPLAIN ANALYZE total runtime != walltime

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lapham(at)jandr(dot)org
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: EXPLAIN ANALYZE total runtime != walltime
Date: 2004-08-26 03:25:26
Message-ID: 11763.1093490726@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jon Lapham <lapham(at)jandr(dot)org> writes:
> Was there something in the output of EXPLAIN ANALYZE VERBOSE that let
> you to conclude that the timing difference was due to a FK referencing
> this table?

No, just general knowledge of what sorts of things could possibly happen
outside the execution of the "statement proper". EXPLAIN ANALYZE's
report of total runtime is honest as far as it goes, but it doesn't
include transaction startup and shutdown because those happen before and
after the EXPLAIN code gets to run. Normally those are quick enough,
but end-of-statement triggers are a common reason for shutdown not to be
quick. So it was an educated guess...

> Should something be mentioned in the docs about foreign-key-checking
> triggers not being included in the total runtime of EXPLAIN ANALYZE?

Feel free to send in a docs patch with suggested wording. I think we
already do mention that planning time isn't accounted for (that part
happens before EXPLAIN starts...) and somewhere right around there would
likely be a good spot.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2004-08-26 03:36:43 Re: Deadlocks caused by referential integrity checks
Previous Message Jan Wieck 2004-08-26 03:23:11 Re: IP clash in the PC