Open joevandyk opened 10 years ago
For large databases, this is way faster than disabling/enabling all the triggers.
set session_replication_role='replica';
Also, instead of executing the DELETE statements one by one, faster to do it in a single WITH query:
with table_1 as (delete from users), table_2 as (delete from orders) select 1
For large databases, this is way faster than disabling/enabling all the triggers.
set session_replication_role='replica';