Re: Slow delete times??
От | Octavio Alvarez |
---|---|
Тема | Re: Slow delete times?? |
Дата | |
Msg-id | 2150.192.168.0.64.1074996762.squirrel@alvarezp.ods.org обсуждение исходный текст |
Ответ на | Slow delete times?? ("Octavio Alvarez" <alvarezp@alvarezp.ods.org>) |
Список | 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. 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
В списке pgsql-performance по дате отправления: