General Principle Behind Indexes

Take a high-level look at how indexing can help speed up data retrieval. Figure 18.1 shows a single table called School Employee that lists the name and occupation of each employee in the school.

Figure 18.1. The School Employee table.

Using the table shown in Figure 18.1, what would you do if you wanted to select the names of all the people in the School Employee table who were janitors? You would have to read every row in the table and display only the names where the occupation in the row is Janitor. The process of reading every row or record in a table to satisfy a query is called a table scan. Now add an index ...

Get Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition 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.