Subject | Re: [firebird-support] Generators and integer primary key fields |
---|---|
Author | Paul Vinkenoog |
Post date | 2005-09-14T16:02:58Z |
Hi Federico,
At that point, you get duplicate values (if the field definition
allows it).
2 * 10^30, you'll run out of numbers in 3,1536 nanoseconds :-)
But if you don't expect the number of rows to ever exceed 2 milliard
(Am.: billion), then an integer field is just fine.
Greetings,
Paul Vinkenoog
> Reading Interbase documentation I notice it says fields recievingThe field value will wrap around to -2^31 and then climb to 0 again.
> generator values must be int64. I'm using integer fields now.
> Is the problem repeated values when I reach the integer limit?
At that point, you get duplicate values (if the field definition
allows it).
> I think the integer limit is 2^(32-1) - 1 (about 2 * 10^30) right?No, about 2 * 10^10.
> I can switch to int64, but I don't plan to run out of integers inIf that estimate was based on the assumption that the integer limit is
> 10.000 years of using the application. Should I switch?
2 * 10^30, you'll run out of numbers in 3,1536 nanoseconds :-)
But if you don't expect the number of rows to ever exceed 2 milliard
(Am.: billion), then an integer field is just fine.
Greetings,
Paul Vinkenoog