国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

mysql optimization - how to explain the problem that mysql primary key is too long and causes secondary indexes to use more space. For example, using uuid as the primary key causes this problem
過去多啦不再A夢(mèng)
過去多啦不再A夢(mèng) 2017-05-18 10:53:33
0
1
929

I thought of this after reading Meituan’s article: http://tech.meituan.com/MT_Le... but I don’t quite understand

mysql official original words are:

If the primary key is long, the secondary indexes use more space, so it is advantageous to have a short primary key

For example, if uuid is used as the primary key, the primary key space becomes larger. Why does it cause the secondary indexes space to also occupy a large space? I don’t understand

過去多啦不再A夢(mèng)
過去多啦不再A夢(mèng)

reply all(1)
習(xí)慣沉默

All indexes other than the clustered index are known as secondary indexes. In InnoDB, each record in a secondary index contains the primary key columns for the row, as well as the columns specified for the secondary index. InnoDB uses this primary key value to search for the row in the clustered index.

This is from the official document, which means that the secondary index will also include the primary, so the larger your primary key, the larger the space occupied by the secondary indexes

Reference: https://dev.mysql.com/doc/ref...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template