|
|
|
|
|
by swid
406 days ago
|
|
I wrote this to a deleted comment, but even if the CTE was materialized, the subquery of the CTE would still not be... For instance, with the stand alone query: DELETE … WHERE id IN (
SELECT id … LIMIT 1 FOR UPDATE SKIP LOCKED
)
the planner is free to turn that IN ( subquery ) into a nested‐loop semi‐join, re-executing the subquery as many times as it deems optimal. Therefore it can delete more than 1 row. |
|