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

Re: slow deletes on pgsql 7.4

From: "Junaili Lie" <junaili(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: slow deletes on pgsql 7.4
Date: 2006-04-26 00:14:56
Message-ID: 8d04ce990604251714g1f5d99bbn172ec554a49c8374@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
hi,
Thanks for the answer.
I have double checked that all the foreign key that are referencing "id" on
scenario are indexed.
I have even vacuum analyze scenario table and all the tables that referenced
this table.
Something that is interesting is that: it only happens for a certain values.

ie. delete from scenario where id='1023' is very fast, but delete from
scenario where id='1099' is running forever.

Any ideas?

J




On 4/25/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "Junaili Lie" <junaili(at)gmail(dot)com> writes:
> > we encounter issues when deleting from a table based on id (primary
> key). O=
> > n
> > certain 'id', it took forever to delete and the i/o is 100% busy.
>
> Almost always, if delete is slow when selecting the same rows is fast,
> it's because you've got a trigger performance problem --- most commonly,
> there are foreign keys referencing this table from other tables and you
> don't have the referencing columns indexed.
>
>                         regards, tom lane
>

In response to

Responses

pgsql-performance by date

Next:From: markDate: 2006-04-26 00:54:40
Subject: Re: Large (8M) cache vs. dual-core CPUs
Previous:From: Will ReeseDate: 2006-04-26 00:02:37
Subject: Re: Slow deletes in 8.1 when FKs are involved

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