Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

1012


Part VII: Performance Tuning and Optimization


FIGURE 45-3
Use the output from DBCC SHOW_STATISTICS to determine the last time the statistics were
updated and the sampling rate.

Changing the order of the key columns may improve the selectivity of an index and
improve its performance for certain queries. Be careful however, because other queries may
depend on the order for their performance.

Unordered Heaps
You can create a table without a clustered index, in which case the data is stored in a
unordered heap. Instead of being stored in sorted order as defi ned by the clustered index
key columns, the rows are identifi ed internally using the heap’s row identifi er. The row
identifi er is an actual physical location composed of three values, FileID:PageNum:SlotNum,
and cannot be directly queried. As mentioned earlier, all nonclustered indexes contain the

c45.indd 1012c45.indd 1012 7/31/2012 10:16:39 AM7/31/2012 10:16:39 AM


http://www.it-ebooks.info
Free download pdf