| From: | Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Choosing primary key type: 64 or 52 bit primary keys? |
| Date: | 2011-07-22 11:52:16 |
| Message-ID: | 201107221452.16369.achill@matrix.gatewaynet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Στις Friday 22 July 2011 13:25:21 ο/η Achilleas Mantzios έγραψε:
> bigint by all means. floating point arithmetic is somewhat more bloated/fuzzy/straight forward than integer,
^^^^^^^^^^
oops sorry i mean "less straight forward"
> 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
>
--
Achilleas Mantzios
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2011-07-22 13:52:52 | Re: Timestamp parsing with blanked time part |
| Previous Message | Craig Ringer | 2011-07-22 11:24:08 | Re: Tracing in Postgres |