Postgresql slow delete from where exists
问题 I'm having trouble with slow delete queries. I have a schema ,say "target" containing tables that all have an equivalent table (identical columns & primary keys) in another one, say "delta". I now want to delete all rows that appear in the delta schema from the target schema. I have tried this using the DELETE FROM WHERE EXISTS approach, but that seems incredibly slow. Here's an example query: DELETE FROM "target".name2phoneme WHERE EXISTS( SELECT 1 FROM delta.name2phoneme d WHERE