MySQL has an internal column per row, 6 byte DB_ROW_ID. How does MySQL generate this ID for a table that has (2^64)-1 rows in it without duplicating DB_ROW_ID?
Asked
Active
Viewed 64 times
1 Answers
2
The internal 6-byte id for InnoDB exists only if you don't have either
- An explicit
PRIMARY KEY
, or - A
UNIQUE
with non-null column(s).
Anyway, there are multiple hard limits that will be hit before a table reaches (2^64)-1 rows. Some will be hit before 2^48.
More on limits: http://mysql.rjweb.org/doc.php/limits

Rick James
- 135,179
- 13
- 127
- 222