Problemunvalidated
I can get the same performance issues with either a select or a delete — they join two tables, and none of the join conditions compares using `=`. Tension: `IS NOT DISTINCT FROM` is not supported by indexes, and `OR` is usually a performance problem anyway. Outcome: the root of your problem are the NULL values.
80746a2f-0b66-4385-924c-d2bfba5c4a3b
I can get the same performance issues with either a select or a delete — they join two tables, and none of the join conditions compares using =. Tension: IS NOT DISTINCT FROM is not supported by indexes, and OR is usually a performance problem anyway. Outcome: the root of your problem are the NULL values.