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 02:18:30
Message-ID: 11174.1093486710@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:
> 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2004-08-26 02:27:15 Re: Problem to connect to the Windows Port
Previous Message Stephan Szabo 2004-08-26 02:10:33 Re: EXPLAIN ANALYZE total runtime != walltime