Search Postgresql Archives

Re: CASCADE/fkey order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 22, 2020 at 9:03 AM Samuel Nelson <valczir.darkvein@xxxxxxxxx> wrote:
seems to fix it to work as we were expecting.  Is that particularly costly?  Should I only set the constraint to be deferred when we really need it?  Would it be more efficient to perform the deletes explicitly within a transaction rather than relying on the cascades and deferring that one constraint?

I don't know.  I tend to go with only deferring the check if the specific transaction requires it.  If there are no issues I would presume that checking at the end would be more efficient.  But if there are problems you could end up performing unnecessary work.  Memory consumption probably increases as well since constraint related information cannot be discarded as each command completes but must be kept around for the eventual validation.

David J.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux