Re: Performance critical technical key - Mailing list pgsql-general

From Christopher Browne
Subject Re: Performance critical technical key
Date
Msg-id m3k6w44h1i.fsf@wolfe.cbbrowne.com
Whole thread Raw
In response to Correct escaping of untrusted data  (Geoff Caplan <geoff@variosoft.com>)
List pgsql-general
After a long battle with technology, geoff@variosoft.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.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pgsql-hackers-win32] error moving table to tablespace (8.0 beta win32 )
Next
From: Tom Lane
Date:
Subject: Re: upgrading in RH 8