Re: Performance critical technical key

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Geoff Caplan <geoff(at)variosoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance critical technical key
Date: 2004-08-12 17:40:23
Message-ID: 20040812174023.GA8739@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 12, 2004 at 13:05:45 +0100,
Geoff Caplan <geoff(at)variosoft(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karam Chand 2004-08-12 17:42:28 Re: Strange pg_hba.conf error (repost)
Previous Message Tom Lane 2004-08-12 17:13:46 Re: Re: We have got a serious problem with pg_clog/WAL synchronization