On Tue, 1 Mar 2016 08:15:25 -0500
Richard Damon <Richard at Damon-Family.org> wrote:

> > The theoretical maximum number of rows in a table is 264
> > (18446744073709551616 or about 1.8e+19). This limit is unreachable
> > since the maximum database size of 140 terabytes will be reached
> > first. A 140 terabytes database can hold no more than approximately
> > 1e+13 rows, and then only if there are no indices and if each row
> > contains very little data.
> >
> You can hit 2^63 insertions well before hitting the size limit of the 
> database if you have also been doing deletions.

Yes.  If you manage 1,000,000 insertion/second, that's 3.15576 *
10^13/year.  You would run out of integers in 584,542 years.  

To get around that, add an "epoch" column, also integer.
Initially it is always zero.  Whenever "position" exceeds 2^63,
increment "epoch" and reset "position" to zero.  

That will give you at least twice as many years.  

--jkl

Reply via email to