10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 4 STORAGE INDEXESpositives will slow down this query. With any other value (except the minimum or maximum value for acolumn), there will most likely be storage regions that can’t be eliminated, even though they don’tactually contain a value that matches the predicates. This is exactly the case in the previous example,where no records were returned for the first query, even though it took 14 seconds to read all the datafrom disk. Notice also that the amount of I/O saved by the null query is almost 16 gigabytes (GB), whilethe amount saved by the first query was only about 3MB. That means that the first query found almostno storage regions that it could eliminate.Physical Distribution of ValuesStorage Indexes behave very differently from normal indexes. They maintain a fairly coarse picture of thevalues that are stored on disk. However, their mechanism can be very effective at eliminating largeamounts of disk I/O in certain situations while still keeping the cost of maintaining them relatively low.It’s important to keep in mind that the physical distribution of data on disk will have a large impact onhow effective the Storage Indexes are. An illustration will make this clearer.Suppose you have a table that has a column with unique values (that is, no value is repeated). If thedata is stored on disk in such a manner that the rows are ordered by that column, then there will be oneand only one storage region for any given value of that column. Any query with an equality predicate onthat column will have to read at most one storage region. Figure 4-2 shows a conceptual picture of aStorage Index for a sorted column.Figure 4-2. A Storage Index on a sorted columnAs you can see from the diagram, if you wanted to retrieve the record where the value was 102, youwould only have one storage region that could possibly contain that value.Suppose now that the same data set is stored on disk in a random order. How many storage regionswould you expect to have to read to locate a single row via an equality predicate? It depends on thenumber of rows that fit into a storage region, but the answer is certainly much larger than the 1 storageregion that would be required with the sorted data set.117x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!