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 11 UNDERSTANDING EXADATA PERFORMANCE METRICS| 1 | SORT AGGREGATE | | 1 | || 2 | BITMAP CONVERSION TO ROWIDS | | 597K| 505 (0)||* 3 | BITMAP INDEX STORAGE FAST FULL SCAN| BI_T1_OWNER | | |-----------------------------------------------------------------------------------Predicate Information (identified by operation id):---------------------------------------------------3 - storage("OWNER" LIKE 'S%')filter("OWNER" LIKE 'S%')In both cases you see that the segments were scanned using a fast full scan, which is just like a full tablescan on the index segments, and the presence of the STORAGE option and storage() predicates on the fullscan operations shows that a Smart Scan predicate offload can be attempted.You may wonder why we keep saying, “Smart Scan predicate offload can be attempted.” It’s becausethere are cases where the Smart Scan either doesn’t really get used or is started but does not completeduring runtime. Yes, the execution plan structure is capable of using a Smart Scan, but whether theSmart Scan is actually executed depends first on whether a direct path read is chosen to scan thesegment or not. We’ve talked about this earlier in this chapter and also in Chapter 2, on Smart Scan, andChapter 6, on parallel execution. Moreover, even if a direct path read is chosen and a Smart Scan isexecuted, then somewhere during (or at the beginning of) Smart Scan execution, a different decisionmay be made. This depends on multiple factors, and we will cover some of them here. Luckily, inaddition to examining the execution plan, we can look at additional metrics to see what’s reallyhappening under the hood.We can try to achieve a Smart Scan on an Index-Organized Table (IOT) segment first to see howvaluable the additional <strong>Oracle</strong> metrics are. Note that as of the current <strong>Oracle</strong> version (Database 11.2.0.2 /Cell 11.2.2.3.2), <strong>Oracle</strong> has not implemented Smart Scan functionality on Index Organized Tablesegments yet, so that’s why this is a good example for practicing using the Smart Scan-related metrics.Check the execution plan shown here; it is from a query using an index fast full scan on an Index-Organized Table’s index segment:SELECT AVG(LENGTH(owner)) FROM t_iot WHERE owner LIKE '%S%'Plan hash value: 1722440769----------------------------------------------------------------| Id | Operation | Name | E-Rows | Cost (%CPU)|----------------------------------------------------------------| 0 | SELECT STATEMENT | | | 2101 (100)|| 1 | SORT AGGREGATE | | 1 | ||* 2 | INDEX FAST FULL SCAN| PK_T_IOT | 31493 | 2101 (1)|----------------------------------------------------------------349

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

Saved successfully!

Ooh no, something went wrong!