Dedicated Server Forum

The Hivelocity Dedicated Server Discussion Forum is a place for Hivelocity clients to meet and chat about all things server. From server promotions to server issues, our technical staff, sales, billing, management and Upper management will be actively involved in these discussions. No question is too big or small, no topic is too stupid to be discussed here. We want all of our clients to feel like this is their home away from home on the net.


 
 
In order to get support you will need to enter your registration details:
 
Please enter your search criteria:
 
 

Dedicated Server Forums by Hivelocity Award winning Dedicated Server hosting > Database Software > PostgreSQL » Why should I disable autocommit while dumping a database?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-03-2009, 01:25 PM
Administrator
 
Join Date: Jul 2009
Posts: 578
Default Why should I disable autocommit while dumping a database?

Turn off autocommit and just do one commit at the end. (In plain SQL, this means issuing BEGIN at the start and COMMIT at the end) If you allow each insertion to be committed separately, PostgreSQL is doing a lot of work for each row that is added. An additional benefit of doing all insertions in one transaction is that if the insertion of one row were to fail then the insertion of all rows inserted up to that point would be rolled back, so you won't be stuck with partially loaded data.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:43 AM.