"Schwenker, Stephen" <SSchwenker@xxxxxxxxxx> writes: > All the tables have primary keys and when I explain the queries, they > use the primary key index. I have increased the shared memory which > only seems to help when the same table is accessed synchronously but > this switching back and forth between tables seems to be slow. There > are approximately 600,000 rows in the tables. And these tables do not > have any references point to them but they do reference other tables. Are you absolutely sure about that last? Unindexed foreign key references are the explanation nine times out of ten when someone complains about deletes being slow. > I'm guessing that the problem lies in loading the indexes off the disk > each time the table switches. For tables with only 600K rows the indexes should be plenty small enough to fit in memory on any modern machine. I'm thinking maybe the problem is enormous index bloat ... does REINDEXing the tables improve matters? > max_fsm_pages = 40000 That seems mighty small :-(. Do a database-wide VACUUM VERBOSE and see what it says about FSM usage in the last few lines of output. regards, tom lane