碎片和GUID聚簇键 [英] Fragmentation and GUID clustered key

查看:160
本文介绍了碎片和GUID聚簇键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图理解为什么GUID聚集索引会产生高碎片/页面拆分?

I'm trying to understand why a GUID clustered index produces high fragmentation / page splits?

推荐答案

数据类型是从来不是碎片化的根本原因。当您在没有空间的页面上添加其他数据时会出现碎片。这导致页面拆分。

The data type is never the root cause for fragmentation. Fragmentation arises when you add additional data onto pages which do not have space free. This leads to a page split.

这有两个常见原因:


  1. 在B树中随机位置的随机位置插入

  2. 增加行大小的更新(在B树中的随机位置)

Guids通常是case(1),除非是按顺序生成( NEWSEQUENTIALID )。

Guids are usually case (1), except if generated in a sequential way (NEWSEQUENTIALID).

这篇关于碎片和GUID聚簇键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆