On Fri, Mar 10, 2006 at 09:36:16 -0500, Emi Lu <[EMAIL PROTECTED]> wrote: > Good morning, > > In a plpgsql function, I am trying to insert 900, 000 records into > several tables. I remembered people mentioned before that it is better > and more efficient to commit actions for let's say every 5000 records' > insertion.
You can't do commits inside of a function. I think you are misremembering advice about not do inserts with a transaction per row which will have a lot of overhead for all of the commits. You can do savepoints inside of a function, but those are going to slow things down, not speed them up. ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match