On Nov 20, 2014, at 6:00 PM, Melvin Davidson wrote:
> Try the following queries. It will give you two .sql files (create_fkeys.sql & drop_fkeys.sql).
Thanks!
I tried a variation of that to create DEFERRABLE constraints, and that was a mess. It appears all the checks ran at
theend of the transaction individually – the process consumed 100% cpu overnight and was stuck on the 'commit' after 16
hours..
So I crossed my fingers and tried your code like this:
BEGIN;
DROP CONSTRAINT ..... x24;
DELETE;
ADD CONSTRAINT ..... x24;
COMMIT;
And that took just over 24 seconds.