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

From Bruno Wolff III
Subject Re: Performance critical technical key
Date
Msg-id 20040812174023.GA8739@wolff.to
Whole thread Raw
In response to Performance critical technical key  (Geoff Caplan <geoff@variosoft.com>)
Responses Re: Performance critical technical key  (Geoff Caplan <geoff@variosoft.com>)
List pgsql-general
On Thu, Aug 12, 2004 at 13:05:45 +0100,
  Geoff Caplan <geoff@variosoft.com> 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?

Using a sequence shouldn't be slow. The main potential problem is that
it will make the session IDs guessible if you don't take any other
steps. That may or may not be a problem. One way around this is to
encrypt the sequence number in the database with a key and use a combination
of the encrypted string and an index for which key is used (this makes
changing keys for new sessions while allowing continued use of an old
key for old sessions) as the session id. You can change the keys as often
as needed and practical for your application.

pgsql-general by date:

Previous
From: Paramveer.Singh@trilogy.com
Date:
Subject: Re: pl pgsql grammer file contains error
Next
From: Bruno Wolff III
Date:
Subject: Re: Access restrictions on rows depending on value of the a column