Re: Random-looking primary keys in the range 100000..999999 - Mailing list pgsql-general

From Kynn Jones
Subject Re: Random-looking primary keys in the range 100000..999999
Date
Msg-id CAFvQaj6xB82JE5YjfNRqj623eXiXTCnJUkwRWoFA7Yge6NhWrQ@mail.gmail.com
Whole thread Raw
In response to Re: Random-looking primary keys in the range 100000..999999  (hubert depesz lubaczewski <depesz@gmail.com>)
Responses Re: Random-looking primary keys in the range 100000..999999  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Fri, Jul 4, 2014 at 10:13 AM, hubert depesz lubaczewski <depesz@gmail.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump slower than pg_restore
Next
From: Tom Lane
Date:
Subject: Re: Random-looking primary keys in the range 100000..999999