Re: Performance critical technical key

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance critical technical key
Date: 2004-08-12 13:33:45
Message-ID: m3k6w44h1i.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

After a long battle with technology, geoff(at)variosoft(dot)com (Geoff Caplan), an earthling, wrote:
> b) Use a sequence. Faster for the SELECTS and UPDATES, I guess, but
> how much will the sequence slow down the INSERTS on a medium sized
> record-set?

Why, in particular, would you expect the sequence to slow down
inserts? They don't lock the table.

Note that if you're really doing a lot of INSERTs in parallel, you
might find it worthwhile to configure the sequence to cache some
number of entries so that they are pre-allocated and stored in memory
for each session (e.g. - for each connection) for quicker access. See
the documentation for "create sequence" for more details...
--
output = reverse("gro.gultn" "@" "enworbbc")
http://www3.sympatico.ca/cbbrowne/x.html
Think of C++ as an object-oriented assembly language.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-08-12 13:39:37 Re: [pgsql-hackers-win32] error moving table to tablespace (8.0 beta win32 )
Previous Message Bruce Momjian 2004-08-12 13:30:11 Re: PgSQL 8.0.0 beta1 compile problem + patch