Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group