Understanding Transactions

From: Joe Koenig <joe(at)jwebmedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Understanding Transactions
Date: 2001-12-12 17:29:51
Message-ID: 3C17940F.DBFC66B1@jwebmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've been reading through the archive and I see that when doing a large
amount of inserts it is much faster to wrap a bunch of them in a
transaction. But here's my question. Say I need to do about 100,000
inserts and using COPY isn't an option. Is postgres going to do the
inserts faster in groups of 1,000 or 5,000? I know that letting each
insert be in its own transaction creates a lot of overhead, but I didn't
know if putting 5,000 inserts into a transaction created overhead for
that transaction. Hopefully my question makes sense. Thanks,

Joe

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2001-12-12 17:42:45 Re: [GENERAL] Using Cursor in PostgreSQL 7.2
Previous Message Brian Hirt 2001-12-12 17:13:42 ACK table corrupted, unique index violated.