Re: Choosing primary key type: 64 or 52 bit primary keys? - Mailing list pgsql-general

From Achilleas Mantzios
Subject Re: Choosing primary key type: 64 or 52 bit primary keys?
Date
Msg-id 201107221325.21770.achill@matrix.gatewaynet.com
Whole thread Raw
In response to Choosing primary key type: 64 or 52 bit primary keys?  (Antonio Vieiro <antonio@antonioshome.net>)
Responses Re: Choosing primary key type: 64 or 52 bit primary keys?
List pgsql-general
bigint by all means. floating point arithmetic is somewhat more bloated/fuzzy/straight forward than integer,
and even if postgresql was perfect regarding floating point comparisons, no one can claim
the same for client languages. So define your PK as bigint.

Στις Friday 22 July 2011 10:01:58 ο/η Antonio Vieiro έγραψε:
> Hi all,
>
> I'd like to use an integer number for my primary key. I need it to be
> bigger than 32 bits.
>
> As far as I understand I have two options:
>
> a) use all the 64 bits of a 'bigint'
> b) use the 52 mantissa bits of a 'double precision'
>
> My question is, which would be faster for indexing? I assume the
> bigint wins here, right?
>
> Thanks in advance,
> Antonio
>



--
Achilleas Mantzios

pgsql-general by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: Maximum number of client connection supported by Postgres 8.4.6
Next
From: Willy-Bas Loos
Date:
Subject: Re: COPY TO '|gzip > /my/cool/file.gz'