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

From Tom Lane
Subject Re: EXPLAIN ANALYZE total runtime != walltime
Date
Msg-id 11174.1093486710@sss.pgh.pa.us
Whole thread Raw
In response to EXPLAIN ANALYZE total runtime != walltime  (Jon Lapham <lapham@jandr.org>)
Responses Re: EXPLAIN ANALYZE total runtime != walltime
List pgsql-general
Jon Lapham <lapham@jandr.org> writes:
> I have been using the EXPLAIN ANALYZE command to debug some performance
> bottlenecks in my database.  In doing so, I have found an oddity (to me
> anyway).  The "19ms" total runtime reported below actually takes 25
> seconds on my computer (no other CPU intensive processes running).

I think that the foreign-key-checking triggers that are fired by the
DELETE will execute at end of statement, which is outside the time
window measured and reported by EXPLAIN ANALYZE.  Better look at your FK
setup.  The usual culprit for slow DELETE is an unindexed referencing
column in another table, but it could also be that the referencing
column is not the same datatype as the key column.

            regards, tom lane

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: EXPLAIN ANALYZE total runtime != walltime
Next
From: Jan Wieck
Date:
Subject: Re: Problem to connect to the Windows Port