Re: Random-looking primary keys in the range 100000..999999

From: Kynn Jones <kynnjo(at)gmail(dot)com>
To: hubert depesz lubaczewski <depesz(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Random-looking primary keys in the range 100000..999999
Date: 2014-07-04 14:49:29
Message-ID: CAFvQaj6xB82JE5YjfNRqj623eXiXTCnJUkwRWoFA7Yge6NhWrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jul 4, 2014 at 10:13 AM, hubert depesz lubaczewski <depesz(at)gmail(dot)com
> wrote:

> How many rows do you plan on having in this table?
>

Currently, only around 10K, but there's expectation that the number will
grow. It's hard to predict how much, hence the generous extra space.

> Why this particular key range?
>

The requirements I've been given for the keys is that they be numeric,
reasonably easy to type (hence, no 40-digit keys), never beginning with 0,
and carrying no additional information content (or even suggesting it).
Among the pieces of information that the key should not include is the
relative time of entry into the DB (hence, the keys should be more or less
evenly distributed over the 100K-1M range).

k

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-07-04 14:59:33 Re: Random-looking primary keys in the range 100000..999999
Previous Message Tom Lane 2014-07-04 14:19:38 Re: pg_dump slower than pg_restore