I want to update 3 million records within some seconds. i have tried doing below things
ALTER TABLE imagingresourceplanning.opnav_fact_revenue_costs SET UNLOGGED ;
ALTER TABLE imagingresourceplanning.opnav_fact_revenue_costs DISABLE TRIGGER ALL;
once the update is done i am reverting this settings. with this change i have noticed that my update time is now 2 minutes which was eariler taking 10 min.
What other settings i can disable in PostgreSQL to make update even more faster. Data in my table is inserted and update by nightly job.
My postgresql version is 9.5
Thanks
Best Answer
You should be able to increase your update speed by "disabling" foreign keys check as explained here.