OTARIKI OTARIKI - 23 days ago 15
MySQL Question

Real project, when bigint maxvalue can be reached

So, MySQL, postgreSQL, SQL server provides maximum value for bigint:

9,223,372,036,854,775,807
.

(Oracles max value for number type is even bigger).

Question is: Do you know / heard / imagined the table / project (even partitioned table with same sequence), when rows count is so bigger, that max value of bigint can be reached?

May be not direct programming question, but just wonder, would I worried, If I use one sequence, with different (but same structured) tables? (like partitioned tables).

I mean, may be this happened with real projects? not if deliberately do endless cycle, or something like this, just for reaching.

Answer

Do some basic math.

If each row in such a table had a single byte of data, you'd have around ten million terabytes in total. We'd be measuring in exabytes in that case, but terabytes is a measure people will grasp.

Comments