Reputation: 161
According to the MySQL website, the signed bigint can go up to 18446744073709551615. What if I need a number bigger than that for the auto-incrementing primary key?
Upvotes: 16
Views: 12481
Reputation: 40884
If you insert 1 million records per second 24x7, it will take 584542 years to reach the limit.
I hope by then a next version of MySQL will support bigger ID columns :)
Upvotes: 105
Reputation: 17530
With such a number (1 to 18446744073709551615), you can give all the animals on the earth a unique ID :)
Upvotes: 17
Reputation: 8700
I suppose you're screwed? You could get rid of MySQL's auto increment and could use a base 64 number you increment yourself.
Upvotes: 2