Will Reese <wreese@xxxxxxxxxxxxx> 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