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 6 MAKING PCBSSo as you can see, enabling Auto DOP allowed the statement to be parallelized, even though thetable was not decorated with a parallel setting. Also, notice that the plan output produced by DBMS_XPLANshows that Auto DOP was enabled and the calculated DOP was 5.<strong>Oracle</strong> has provided some control over the Automatic DOP calculations as well with thePARALLEL_DEGREE_LIMIT parameter. The default value for this parameter is CPU, which tells <strong>Oracle</strong> tocalculate an “Ideal DOP” based on the amount of data, but then caps it with a formula based onCPU_COUNT, THREADS_PER_CPU, and ACTIVE_INSTANCE_COUNT.I/O Calibration<strong>Oracle</strong> Database version 11.2.0.2 introduced a restriction to Auto DOP requiring that the I/O system becalibrated before statements will be automatically parallelized. The calibration is done by theDBMS_RESOURCE_MANAGER.CALIBRATE_IO procedure, which generates a random read-only workload andspreads it across all instances in a RAC cluster. It runs for several minutes (longer on RAC databasesbecause it must run on each instance). The procedure can put a significant load on the system, and thedocumentation recommends running it when the system is idle or very lightly loaded. Here’s anexample of what happens if the calibration procedure has not been run on 11.2.0.2:SYS@LAB11202> @dplanEnter value for sql_id: 05cq2hb1r37trEnter value for child_no:PLAN_TABLE_OUTPUT---------------------------------------------------------------------------------------SQL_ID 05cq2hb1r37tr, child number 0-------------------------------------select avg(pk_col) from kso.skew a where col1 > 0Plan hash value: 568322376---------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |---------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | | 44298 (100)| || 1 | SORT AGGREGATE | | 1 | 11 | | ||* 2 | TABLE ACCESS FULL| SKEW | 32M| 335M| 44298 (1)| 00:01:29 |---------------------------------------------------------------------------Predicate Information (identified by operation id):---------------------------------------------------2 - filter("COL1">0)Note------ automatic DOP: skipped because of IO calibrate statistics are missing23 rows selected.As you can see, when the I/O calibration has not been done, Auto DOP is disabled and the optimizergenerates a serial execution plan. There are two views that provide additional information about the149

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

Saved successfully!

Ooh no, something went wrong!