Re: Delete query takes exorbitant amount of time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Lewis <mark(dot)lewis(at)mir3(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Delete query takes exorbitant amount of time
Date: 2005-03-25 02:32:56
Message-ID: 4009.1111717976@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mark Lewis <mark(dot)lewis(at)mir3(dot)com> writes:
> I've got a similar problem with deletes taking a very long time. I know
> that there are lots of foreign keys referencing this table, and other
> foreign keys referencing those tables, etc. I've been curious, is there
> a way to find out how long the foreign key checks take for each
> dependent table?

There is not any easy way at the moment.

Hmm ... I wonder how hard it would be to teach EXPLAIN ANALYZE to show
the runtime expended in each trigger when the statement is of a kind
that has triggers. We couldn't break down the time *within* the
triggers, but even this info would help a lot in terms of finger
pointing ...

Seq Scan on ... (nn.nnn ms)
Trigger foo: nn.mmm ms
Trigger bar: nn.mmm ms
Total time: nn.mmm ms

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Karim Nassar 2005-03-25 02:58:40 Re: Delete query takes exorbitant amount of time
Previous Message Tom Lane 2005-03-25 01:48:38 Re: Delete query takes exorbitant amount of time