Ads

03 February 2011

Pages and Extents

Pages and Extents

SQL Server stores data in blocks of 8 Kb called Pages and eight contiguous extents are the basic unit of storage for tables and indexes, called Extents. There are two types of extents:

Uniform extents - the entire extent contains data from one table.

Mixed extents - the extent contains data from two to eight different tables. This is the case of either tables with less than eight pages or the last pages from a table with a total number of pages multiple of eight.

Data Pages are pages that contain data from tables, there are two ways to organize such pages:

Clustered tables - tables with one clustered index, the pages are linked in a doubly-linked list using the index as a key and the index is stored as a B-tree structure. Indexed views have an identical structure as Clustered tables.

Heaps - tables with no clustered index, the data pages are stored in no particular order and not linked.

Non-clustered indexes have a B-tree index structure but the data pages are stored in no particular order.

No comments:

Post a Comment