Avoid using MySQL as the identification string type column

Avoid using as the identification string type column:

  • Consumption of space.
  • Slower than the digital type (MyISAM strings for use in compression index, the query will be slower).

 

For MD5 (), UUID (random string generation), these values ​​are distributed in a large space, leading to insert, select statements slow:

  • insert randomly written to different locations, so that insert slow; cause a page split, random disk access for clustered indexes also produces engines index fragmentation.
  • select slower, logically adjacent lines in different location of the disk, memory.
  • Random value will make the effect of variation cache, cache locality principle failure; memory is too small, resulting in frequent refresh, do not hit.

 

Guess you like

Origin www.cnblogs.com/miaooooo/p/12373846.html