one transaction or multiple inserts? - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject one transaction or multiple inserts?
Date
Msg-id 3D9C08D7.6020700@mega-bucks.co.jp
Whole thread Raw
Responses Re: one transaction or multiple inserts?  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
List 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


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: foreach in sql functions
Next
From: "Shridhar Daithankar"
Date:
Subject: Re: one transaction or multiple inserts?