Databases Reference
In-Depth Information
CPU time = 15 ms, elapsed time = 590 ms.
-- Warm Run
Table 'lastNames'. Scan count 1, logical reads 9, physical reads 0, read-ahead
reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'lastNames'. Scan count 0, logical reads 2, physical reads 0, read-ahead
reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 4 ms.
Figure 11-4
There are two differences between these stats and the earlier pre-indexed stats. Now that you are using
the clustered index on lastnames, the number of logical reads is reduced dramatically from eight down
to two. In addition, when the table is read on the cold run, now it's getting read in using a Read Ahead,
which brings the whole table into memory much more quickly than if you use a regular table scan as you
did before indexing.
Now take a look at the SHOWPLAN_TEXT output and confirm what you are observing in the I/O stats. Here
is the relevant section from the plan output:
Search WWH ::




Custom Search