Subject | Re: generators and bigint |
---|---|
Author | Adam |
Post date | 2005-02-21T20:30:09Z |
Yes, unless you have reason not to.
The Integer datatype only holds 2^32 or 4,294,967,296 possible values.
Unless you are using unsigned numbers, chances are you lose have the
possible values (because your generator probably starts at 0).
The Int64 / BigInt (same thing) datatype holds 2^64 or
18,446,744,073,709,551,616 possible values. If you use integers, then
you self impose a limit of about 2 billion unique records, with int64,
you could get 100 unique values per second for thousands of years.
Hope that helps.
Adam
--- In firebird-support@yahoogroups.com, "Dixon Epperson"
<dixonepperson@y...> wrote:
The Integer datatype only holds 2^32 or 4,294,967,296 possible values.
Unless you are using unsigned numbers, chances are you lose have the
possible values (because your generator probably starts at 0).
The Int64 / BigInt (same thing) datatype holds 2^64 or
18,446,744,073,709,551,616 possible values. If you use integers, then
you self impose a limit of about 2 billion unique records, with int64,
you could get 100 unique values per second for thousands of years.
Hope that helps.
Adam
--- In firebird-support@yahoogroups.com, "Dixon Epperson"
<dixonepperson@y...> wrote:
> Martijn,
> I thought it was int64 but wanted to make sure. However,
> are you also saying I definitely should be using bigint instead of
> integer?
>
> E. D. Epperson