From: Octavio Alvarez <alvarezp@alvarezp.ods.org>
To: pgsql-performance@postgresql.org
Subject: Re: Slow delete times??
Date: Sat, 24 Jan 2004 18:12:42 -0800 (PST)
Message-ID: <2150.192.168.0.64.1074996762.squirrel@alvarezp.ods.org> (raw)
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.
Thanks.
Octavio.
Tom Lane said:
> "Octavio Alvarez" <alvarezp@alvarezp.ods.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
this
>> 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@alvarezp.ods.org
--
Octavio Alvarez Piza.
E-mail: alvarezp@alvarezp.ods.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: alvarezp@alvarezp.ods.org
Subject: Re: Slow delete times??
In-Reply-To: <2150.192.168.0.64.1074996762.squirrel@alvarezp.ods.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox