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 INDEXES■ Kevin Says: Storage Indexes are stored in the heap of cellsrv, so technically speaking they could end up ondisk (swap) under insane conditions…so, not never…Figure 4-1 shows a conceptual view of the data contained in a Storage Index.SELECT cust_stateFROM customersWHERE cust_age > 35Based on thepredicate, thestorage indexon this columnwill be usedBecause only this 1MBregion of data satisfiesthe predicate, only thisdata will be scanned1MBRange1MBRangeFigure 4-1. Conceptual diagram of a Storage IndexAs you can see in the diagram, the first storage region in the Customer table has a maximum value of77, indicating that it’s possible for it to contain rows that will satisfy the query predicate (cust_age >35).The other storage regions in the diagram do not have maximum values that are high enough to containany records that will satisfy the query predicate. Therefore, those storage regions will not be read fromdisk.In addition to the minimum and maximum values, there is a flag to indicate whether any of therecords in a storage region contain nulls. The fact that nulls are represented at all is somewhat surprisinggiven that nulls are not stored in traditional <strong>Oracle</strong> indexes. This ability of Storage Indexes to track nullsmay actually have repercussions for design and implementation decisions. There are systems that don’tuse nulls at all. SAP, for example, uses a single space character instead of nulls. SAP does this simply toinsure that records can be accessed via B-Tree indexes (which do not store nulls). At any rate, StorageIndexes provide the equivalent of a bit-mapped index on nulls, which makes finding nulls a very efficientprocess (assuming they represent a low percentage of the values).106

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

Saved successfully!

Ooh no, something went wrong!