Does Clustered index needs one extra table to sort/keep the rows data? When it does the sorting , on each Insert or delete statement or when ? How clustered index store data and how it is different from Non-clustered one.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
- The data is the clustered index
- Index sort is on creation/rebuild only
- Inserts may create page splits and pointers
- Deletes leave gaps
- Gaps are removed by index rebuild
- Clustered = data sorted as per definition
- Non-clustered = points to clustered index and has it's own sort
Starter article on Simple-Talk
A more in depth article on Simple-Talk
Edit: Another Simple-Talk article on index maintenance