in Pl/PgSQL, do commit every 5000 records

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: in Pl/PgSQL, do commit every 5000 records
Date: 2006-03-10 14:36:16
Message-ID: 44118EE0.7090705@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message igor 2006-03-10 14:57:14 panic during pgsql startup
Previous Message Clive Page 2006-03-10 14:04:26 Re: Baffled by failure to use index when WHERE uses a