0

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?

Arvinder
  • 71
  • 1
  • 1
  • 6

1 Answers1

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