David Leangen <postgres@xxxxxxxxxxx> writes: > The only inconvenience is that I need to remove all the foreign key > constraints before truncating, then put them back after. I was about to ask if you had any. Usually the reason for DELETE being slow is that you have foreign key references to (not from) the table and the referencing columns aren't indexed. This forces a seqscan search of the referencing table for each row deleted :-( regards, tom lane