What if I need a very very big autoincrement ID?
According to t开发者_StackOverflowhe 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?
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 :)
With such a number (1 to 18446744073709551615), you can give all the animals on the earth a unique ID :)
I suppose you're screwed? You could get rid of MySQL's auto increment and could use a base 64 number you increment yourself.
精彩评论