one transaction or multiple inserts?

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: one transaction or multiple inserts?
Date: 2002-10-03 09:07:35
Message-ID: 3D9C08D7.6020700@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When inserting a lot of data into a DB which would be faster, doing all
the inserts in one transaction or doing multiple inserts?

And more importantly, why? :)

I'M assuming that each insert is in fact a transaction and doing, for
example, 1000 inserts is the same as doing 1000 transaction. But if I
put them all in one transaction, it would be equivalent to doing (duh) 1
transaction.

Thanks,

Jc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2002-10-03 09:18:40 Re: one transaction or multiple inserts?
Previous Message Patrick Fiche 2002-10-03 08:35:36 Re: foreach in sql functions