Re: EXPLAIN ANALYZE total runtime != walltime - Mailing list pgsql-general

From Tom Lane
Subject Re: EXPLAIN ANALYZE total runtime != walltime
Date
Msg-id 11763.1093490726@sss.pgh.pa.us
Whole thread Raw
In response to Re: EXPLAIN ANALYZE total runtime != walltime  (Jon Lapham <lapham@jandr.org>)
List pgsql-general
Jon Lapham <lapham@jandr.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

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: IP clash in the PC
Next
From: Bruce Momjian
Date:
Subject: Re: Deadlocks caused by referential integrity checks