From: Thomas Swan <tswan@olemiss.edu>
To: Michael Teter <michael_teter@yahoo.com>
To: Steve Wampler <swampler@noao.edu>
To: Poet/Joshua Drake <poet@linuxports.com>
Cc: postgres-sql <pgsql-sql@postgresql.org>
Subject: Re: Using a postgres table to maintain unique id?
Date: Tue, 14 Nov 2000 11:35:01 -0600
Message-ID: <5.0.0.25.0.20001114113001.00aad5f8@sunset.backbone.olemiss.edu> (raw)
In-Reply-To: <20001114022241.6363.qmail@web10008.mail.yahoo.com>
At 11/13/2000 06:22 PM -0800, Michael Teter wrote:
> > Can someone show me how to create (and use) an int8
> > sequence?
>
> From what I can tell (both from docs and doing a
>describe on sequences in my database), a postgresql
>sequence is an int4, not an int8, and thus you are
>limited to a max of 2.1 billion values.
>
>If you require an int8 sequence, you'll probably have
>to manage your own and just use an int8 column.
I had originally started using int8 and creating custom
sequences. However, as mentioned in a previous post, there is an inherent
performance penalty in using int8 over int4. Tom Lane advised me that the
int8 routines are an emulated or synthesized data type. in the test I did
on our 7.0.2 server I notice about a 25-30% decrease in performance when
using complex joins on tables containing referential keys, primary keys all
in the int8 data type.
This might be something to think about as well.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tswan@olemiss.edu, michael_teter@yahoo.com, swampler@noao.edu, poet@linuxports.com
Subject: Re: Using a postgres table to maintain unique id?
In-Reply-To: <5.0.0.25.0.20001114113001.00aad5f8@sunset.backbone.olemiss.edu>
References: <20001114022241.6363.qmail@web10008.mail.yahoo.com> <5.0.0.25.0.20001114113001.00aad5f8@sunset.backbone.olemiss.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox