Question

I'm reading Itzik's book "Querying Microsoft SQL Server 2012" as well as reading/watching different educational material on the internet. My intention is to have a useful understanding of how the database internals work.

I have a small doubt that I couldn't resolve about the IAM pages. Since I'm in a very early stage of my understanding I need maybe extra help from those who have a better picture of it, so excuse me if my doubts seem ridiculous.

In chapter 15 "Implementing Indexes and Statistics" appears an image - shown below - as an example of an IAM page:

Example IAM page

You can see by the red arrow what seems to be 16 pages related to the same extent. How is that possible? Is it an author/editor's mistake? Or what is more likely: is there something I'm not understanding correctly?

The other question I have is related to the pages intervals. Why aren't they contiguous? Take for example the last extent, it will cover pages with id 336 to 22642, or the preceding one, 296 to 328.

Was it helpful?

Solution

You can see by the red arrow what seems to be 16 pages related to the same extent. How is that possible?

The red arrow points to an entry showing that extents starting at 1:176 and 1:184 are allocated to the current entity (both 8-page uniform extents are in use) within the GAM interval.

The other question I have is related to the pages intervals. Why aren't they contiguous? Take for example the last extent, it will cover pages with id 336 to 22642, or the preceding one, 296 to 328.

They are not extents, they are extent ranges allocated to the current entity (e.g. table, index) within the 4GB GAM interval the current IAM page covers.

The extent ranges shown as NOT ALLOCATED may be in use by other entities.

For more information, see Inside the Storage Engine: IAM pages, IAM chains, and allocation units by Paul Randal.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top