Subject Re: [ib-support] Generator Limits and How to Cope
Author Lucas Franzen
Paul Reeves schrieb:
> Considering that no new project is likely to be in IB5.n we don't really need
> to speculate about the shortage of 32-bit based generator numbers. However,
> unless my arithmetic is horribly wrong, I believe it will take you some 23,000
> years to increment your way through 2Gb of generators at 1 generator per
> second. Even ten a second will last over two thousand years. A hundred a
> second will give you two hundred years worth. Your going to run into other
> limits long before your generators start wrapping around.


it's 68 years.
32 bit signed is 2.17 Billions in the positive range.
One day has 86400 seconds, so an average year has 365.25 * 86400

2.17 * 10^9 / 86400 / 365.25 =~ 68 (years)


If this is not enough you can use a combined primary key on two fields,
where the first is incremented as usually and the second by another
generator which will increase itself only when the first ones rolls

I'm working with Interbase for five years now but I never had 2 billion
records in any table.

Not even 10 millions.