Re: Slow deletes in 8.1 when FKs are involved
От | Tom Lane |
---|---|
Тема | Re: Slow deletes in 8.1 when FKs are involved |
Дата | |
Msg-id | 20018.1145849559@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Slow deletes in 8.1 when FKs are involved (Will Reese <wreese@rackspace.com>) |
Ответы |
Re: Slow deletes in 8.1 when FKs are involved
|
Список | pgsql-performance |
Will Reese <wreese@rackspace.com> writes: > ... Both servers have identical postgresql.conf settings and were > restored from the same 7.4 backup. Almost everything is faster on the > 8.1 server (mostly due to hardware), except one thing...deletes from > tables with many foreign keys pointing to them. I think it's unquestionable that you have a bad FK plan in use on the 8.1 server. Double check that you have suitable indexes on the referencing (not referenced) columns, that you've ANALYZEd all the tables involved, and that you've started a fresh psql session (remember the backend tends to cache FK plans for the life of the connection). It might help to EXPLAIN ANALYZE one of the slow deletes --- 8.1 will break out the time spent in FK triggers, which would let you see which one(s) are the culprit. regards, tom lane
В списке pgsql-performance по дате отправления: