Creating Indexes to Provide Faster Query Execution

Now we will have a look at how indexes work and how they improve query performance. In SQL Server, it is possible to define two different types of indexes: clustered indexes and nonclustered indexes. To understand how indexes can improve data access and which index type to use for a given situation, it is essential to understand how data and indexes are stored in data files and how SQL Server accesses data in data files.

Heap Structures

A data file in a SQL Server database is divided in 8k pages. Every page can contain data, indexes, or other types of data that SQL Server needs to maintain the data files. However, the majority of the pages are data or index pages. Pages are the units that SQL ...

Get Microsoft® SQL Server™ 2005: Applied Techniques Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.