Re: Large database design advice

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Harald Armin Massa <haraldarminmassa(at)gmail(dot)com>
Cc: Joe Kramer <cckramer(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Large database design advice
Date: 2006-08-24 17:37:10
Message-ID: 20060824173710.GA30872@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 24, 2006 at 07:19:29PM +0200, Harald Armin Massa wrote:
> so with serial there are only 2.147.483.648 possible recordnumbers.

Actually 2147483647 using the default sequence start value of 1 and
going up to 2^31 - 1, the largest positive value a 32-bit integer
can hold. You could get the full 32-bit range (4294967296) by
allowing negative numbers and setting the sequence's MINVALUE and
RESTART value to -2^31 (-2147483648).

> Which should still be enough for "millions of records"

Correct.

--
Michael Fuhr

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rajarshi Guha 2006-08-24 17:59:36 Re: getting around 'out of memory' errors
Previous Message Tom Lane 2006-08-24 17:17:49 Re: invalid byte sequence ?