user3104183
user3104183

Reputation: 408

Fragmentation and GUID clustered key

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

Upvotes: 0

Views: 107

Answers (1)

usr
usr

Reputation: 171178

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.

There are 2 common reasons for this:

  1. Inserts at random places at random places in the B-tree
  2. Updates increasing the size of a row (at random places in the B-tree)

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

Upvotes: 3

Related Questions