"David G. Johnston" <david.g.johnston@xxxxxxxxx> writes: > On Mon, Jan 14, 2019 at 8:18 AM Campbell, Lance <lance@xxxxxxxxxxxx> wrote: >> When deleting a large number of records with constraints and triggers PostgreSQL is exceptionally slow. > You may wish to provide an explicit situation that you are > experiencing so that others may offer their experienced insights as to > whether you could be doing anything different to increase the speed of > your deletes or techniques to batch them yourself. Given the mention of constraints, I'm suspicious that the problem is foreign key constraint(s) that lack an index on the referencing column(s). PG will let you do that, but if you care about the speed of deletes on the referenced table, you don't want to omit the index on the referencing side. regards, tom lane