Performance critical technical key

From: Geoff Caplan <geoff(at)variosoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Performance critical technical key
Date: 2004-08-12 12:05:45
Message-ID: 166360425184.20040812130545@variosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi folks

I'm designing a table to be used for web session management. If all
goes well with the project, the table should have 100,000+ records and
be getting hammered with SELECTS, INSERTS and UPDATES.

The table will need a technical key. The question is, what is the most
efficient way to do this?

a) Generate a random 24 character string in the application. Very
quick for the INSERTs, but will the longer key slow down the the
SELECTs and UPDATES?

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?

There will probably be 6-8 SELECTs & UPDATEs for each INSERT.

I appreciate that I could set up some tests, but I am under the hammer
time-wise. Some rule-of-thumb advice from the list would be most
welcome.

------------------
Geoff Caplan
Vario Software Ltd
(+44) 121-515 1154

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Renato Cramer 2004-08-12 12:54:25 Access restrictions on rows depending on value of the a column
Previous Message Raphael Bauduin 2004-08-12 11:43:18 Re: history tables with only one function?