How many insert + update should one transaction handle?

From: Yonatan Ben-Nes <da(at)canaan(dot)co(dot)il>
To: pgsql-general(at)postgresql(dot)org
Subject: How many insert + update should one transaction handle?
Date: 2005-09-23 10:51:09
Message-ID: 4333DE1D.9020704@canaan.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

Every few days I need to DELETE all of the content of few tables and
INSERT new data in them.
The amount of new data is about 5 million rows and each row get about 3
queries (INSERT + UPDATE).
Now because I need the old data to be displayed till all of the new data
will be available I'm doing all of the process of deleting the old
content and inserting the new one in one transaction.
Should I divide the insertion so ill insert the new data into a
temporary table and the transaction should be commited every
100,1000,10000 whatever queries? or maybe it doesnt matter to the server
whats the size of the transaction and its ok to handle such a process in
one transaction?

Thanks alot in advance,
Yonatan Ben-Nes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yonatan Ben-Nes 2005-09-23 11:11:25 Re: Slow search.. quite clueless
Previous Message Hannes Dorbath 2005-09-23 10:34:57 Re: Data Entry Tool for PostgreSQL