logoalt Hacker News

tremonyesterday at 7:12 PM1 replyview on HN

But in that case, you need to compare like-for-like with the situation where you need to insert all the prerequisite rows too. You can't just compare a delete cascade with a single insert where all the foreign keys are already satisfied.


Replies

fidotronyesterday at 9:17 PM

The whole problem with the delete cascade is you can't tell how big it will be until you have entered the transaction to do it. An insert you either know or it will fail and you can retry.

show 1 reply