in Pl/PgSQL, do commit every 5000 records - Mailing list pgsql-general

From Emi Lu
Subject in Pl/PgSQL, do commit every 5000 records
Date
Msg-id 44118EE0.7090705@encs.concordia.ca
Whole thread Raw
Responses Re: in Pl/PgSQL, do commit every 5000 records
List pgsql-general
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.

May I get more inputs about why and how this commit can speed up the
transaction please?

Thanks a lot,
Ying


pgsql-general by date:

Previous
From: Clive Page
Date:
Subject: Re: Baffled by failure to use index when WHERE uses a
Next
From: igor@carcass.ath.cx
Date:
Subject: panic during pgsql startup