The current solution is to just increase the size and hope that its
large enough that you won't run out of numbers.
This is true of any and all of the databases.
But in theory, when a roll over occurs, you should be able to do some
predictive analysis and determine the next open slot within the B-Tree
index.
While this is a very esoteric issue, as disk becomes cheap and more
data is captured, this may become an issue faster than people think.
For most people there is an implied time ordering with serials which
your suggestion would break
That's what serial8 is for
It ranges to 9,223,372,036,854,775,807 which is probably enough for most
applications
With multiple OLTP transactions occurring simultaneously, with a
serial you only guarantee uniqueness. You don't guarantee order.
And with the current implementation, when you go past the end of the
largest number of a serial, you start over. So today, you still wrap
around.
> That's what serial8 is for
>
> It ranges to 9,223,372,036,854,775,807 which is probably enough for most
> applications
I know. Its a large number. But I'm starting to see some applications
where its possible to surpass that number.
Remember this doesn't mean that the table has to hold that many rows
since they can be purged, but the serial counter will continue to
grow.
This is more of a theoretical issue. The idea is if you can look at a
b-tree index and find the next open node.
I am curious what you define as where it is possible to surpass this
number.
By my math even at a 10 trillion transactions a day
(10,000,000,000,000). it still takes 92,230 days(over 250 years) to
get past this number.
As a note, my math says 10 trillion a day comes out to 115 million a
second.
Am I missing something?
Will
Yes, Gumby is a no-brainer.
--
}(:
As a note, please change transactions to records, as I am sure there
will be some pendantic poster out there (though I know there are none
on this board) who is going to bring up how it is quite possible to
insert multiple records in one transaction.
Will
With a small set of bells
Silently? I wish.
--
Cheers,
Obnoxio The Clown
http://obotheclown.blogspot.com
--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.
Alt-M, a
--
RGB