10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 2 OFFLOADING / SMART SCANCOUNT(PK_COL)-------------2Elapsed: 00:00:08.74SYS@SANDBOX> -- enable storage indexesSYS@SANDBOX> alter system set "_kcfis_storageidx_disabled"=false;System altered.Elapsed: 00:00:00.03SYS@SANDBOX> select count(pk_col) from kso.skew3 where col1 < 0;COUNT(PK_COL)-------------2Elapsed: 00:00:00.08In this example we disabled storage indexes (using the _KCFIS_STORAGEIDX_DISABLED parameter) toremind you of the elapsed time required to read through 384 million rows using Column Projection andPredicate Filtering. Remember that even though the amount of data returned to the database tier isextremely small in this case, the storage servers still had to read through every block containing data forthe SKEW3 table and then had to check each row to see if it matched the WHERE clause. This is where themajority of the 8 seconds was spent. We then re-enabled storage indexes and reran the query, whichreduced the execution time to about .08 seconds. This reduction in elapsed time is a result of storageindexes being used to avoid virtually all of the disk I/O and the time spent filtering through thoserecords.Just to reiterate, Column Projection and Predicate Filtering (and most other Smart Scanoptimizations) improve performance by reducing the volume of data being transferred back to thedatabase servers (and thus the amount of time to transfer the data). Storage Indexes improveperformance by eliminating time spent reading data from disk on the storage servers and filtering thatdata. Storage Indexes are covered in much more detail in Chapter 4.Simple Joins (Bloom Filters)In some cases, join processing can be offloaded to the storage tier as well. Offloaded joins areaccomplished by creating what is called a bloom filter. Bloom filters have been around for a long timeand have been used by <strong>Oracle</strong> since <strong>Oracle</strong> Database Version 10g Release 2. So they are not specific to<strong>Exadata</strong>. One of the main ways <strong>Oracle</strong> uses them is to reduce traffic between parallel query slaves. Theyhave the advantage of being very small relative to the data set that they represent. However, this comesat a price— they can return false positives. That is, rows that should not be included in the desired resultset can occasionally pass a bloom filter. For that reason, an additional filter must be applied after thebloom filter to ensure that any false positives are eliminated. The interesting thing about bloom filtersfrom an <strong>Exadata</strong> perspective is that they may be passed to the storage servers and evaluated there. Thistechnique can result in a large decrease in the volume of data that must be transmitted back to databaseservers.Here’s an example:34

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

Saved successfully!

Ooh no, something went wrong!