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

Re: Slow delete times??

From: "Octavio Alvarez" <alvarezp(at)alvarezp(dot)ods(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow delete times??
Date: 2004-01-25 02:12:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

First of, thanks, Tom.

Although I've been very careful on this kind of things, looks like I
missed one index on a referencing column. Still, I don't allow an entire
delete of a table if it has referencing columns with values, so at the
moment of the deletion, it has no rows at all.

I checked datatype mismatches, and there are none. All my FKs are
integers, like the referenced column of the referenced table.

I was thinking on dropping the indexes before doing the deletes, but
Joshua suggested using TRUNCATE instead.


Tom Lane said:
> "Octavio Alvarez" <alvarezp(at)alvarezp(dot)ods(dot)org> writes:
>> Please tell me if this timing makes sense to you for a Celeron 433 w/
RAM=256MB dedicated testing server. I expected some slowness, but not
>> high.
> I'll bet you have foreign keys referencing this table, and the
> referencing columns do not have indexes.  PG will let you do that ...
but it makes updates and deletes horribly slow.  You generally want to
add those indexes.
> If they *are* indexed, check for datatype mismatches.  That's
> another thing that kills performance ...
> 			regards, tom lane

Octavio Alvarez Piza.
E-mail: alvarezp(at)alvarezp(dot)ods(dot)org

Octavio Alvarez Piza.
E-mail: alvarezp(at)alvarezp(dot)ods(dot)org

pgsql-performance by date

Next:From: Tom LaneDate: 2004-01-25 02:55:50
Subject: Re: Benchmarking PostgreSQL?
Previous:From: Ivan VorasDate: 2004-01-25 01:01:53
Subject: Benchmarking PostgreSQL?

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