Choosing primary key type: 64 or 52 bit primary keys?

From: Antonio Vieiro <antonio(at)antonioshome(dot)net>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Choosing primary key type: 64 or 52 bit primary keys?
Date: 2011-07-22 07:01:58
Message-ID: CAPHN3JVGz0pFLUf-bQC-A8bLvSHOXfdegUpSA6tg4axGu=68ow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Radoslaw Smogura 2011-07-22 07:34:34 Re: Choosing primary key type: 64 or 52 bit primary keys?
Previous Message Craig Ringer 2011-07-22 03:21:06 Re: Building an home computer for best Poker Tracker performance