In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
What is the clustering index in mysql? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
Clustering index
A clustered index, also known as a cluster index, is a method of reorganizing the actual data on disk to sort by the value of one or more specified columns. Because the index page pointer of a clustered index points to the data page, using a clustered index to find data is almost always faster than using a non-clustered index. Only one clustered index can be built per table, and a clustered index requires at least 120% of the additional space of the table to hold a copy of the table and the index middle page.
Features:
The order in which data is stored is the same as the order in which it is indexed.
In general, the primary key creates a clustered index by default, and only one clustered index is allowed in a table (reason: once the data is stored, there can only be one order).
This is how the difference between clustered and non-clustered indexes is explained in the principles of Database:
The leaf node of the clustered index is the data node, while the leaf node of the non-clustered index is still the index node, but there is a pointer to the corresponding data block.
Advantages and disadvantages of clustered indexes:
Advantage: when there are few entries queried according to the primary key, there is no need to return the line (the data is under the primary key node).
Disadvantages: if you encounter irregular data insertion, resulting in frequent page fragmentation.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.