Database Reference
In-Depth Information
Figure 3-2. DBCC SHOW_STATISTICS output
ISBN values with the prefix 104 now have the duplicates, and this affects the histogram. It is also worth mentioning
that the density information in the second result set is also changed. The density for ISBN s with duplicate values is
higher than for the combination of (ISBN, BookId) columns, which is still unique.
Let's run the query shown in Listing 3-2, and check the execution plan, as shown in Figure 3-3 .
Listing 3-2. Selecting data for ISBNs starting with '114'
select BookId, ISBN, Title from dbo.Books where ISBN like '114%'
 
Search WWH ::




Custom Search