mysql primary key selection

1, increment easy global conflict

Uses UUID to solve

Disadvantage of 16 bytes waste more space. String type, slow queries. UUID is not sequential growth, as the primary key, written in large IO randomness. Serious performance problems

 

2, the advantages of the self-energizing

Small space, fast mysql retrieve digital speed, sequential growth from the write performance is good.

 

Distributed primary key from the growth

mycat routing solution to sql statement.

 

Guess you like

Origin www.cnblogs.com/xiaofeiyang/p/12467194.html