Performance critical technical key

Поиск
Список
Период
Сортировка
От Geoff Caplan
Тема Performance critical technical key
Дата
Msg-id 166360425184.20040812130545@variosoft.com
обсуждение исходный текст
Ответ на Re: Correct escaping of untrusted data  (Geoff Caplan <geoff@variosoft.com>)
Ответы Re: Performance critical technical key
Re: Performance critical technical key
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Raphael Bauduin
Дата:
Сообщение: Re: history tables with only one function?
Следующее
От: Renato Cramer
Дата:
Сообщение: Access restrictions on rows depending on value of the a column