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 6 MAKING PCBSThis listing shows that you can have Parallel Statement Queuing without turning on Auto DOP. Ofcourse it’s using a hidden parameter, so you probably don’t want to do this on a production systemwithout discussing it with <strong>Oracle</strong> Support first.Controlling Queuing with HintsThere are two hints that can be used to control Parallel Statement Queuing at the statement level. Onehint, NO_STATEMENT_QUEUING, allows the queuing process to be completely bypassed, even if the feature isturned on at the instance level. The other hint, STATEMENT_QUEUING, turns on the queuing mechanism,even if the feature is not enabled at the instance level. The STATEMENT_QUEUING hint provides adocumented avenue for using the queuing feature without enabling Auto DOP. Here is an exampleshowing how to bypass the queuing by using the NO_STATEMENT_QUEUING hint.SYS@EXDB1> set echo onSYS@EXDB1> @test_pxq_hintSYS@EXDB1> -- this should cause queueing, but the hinted statementsSYS@EXDB1> -- should jump the queueSYS@EXDB1> alter system set "_parallel_statement_queuing"=true;System altered.SYS@EXDB1> alter system set parallel_servers_target=32;System altered.SYS@EXDB1> !ss.sh test_pxq_hint1.sql 10 kso/ksostarting 10 copies of test_pxq_hint1.sqlSYS@EXDB1> @queued_sqlSID SQL_ID SQL_EXEC_ID SQL_TEXT----- ------------- ----------- ------------------------------------------------------------484 bgcmmcyyyvpg9 16777239 select /*+ parallel (a 16) */ avg(pk_col) from kso.skew3 awhere col1 > 0774 bgcmmcyyyvpg9 16777240584 bgcmmcyyyvpg9 16777241199 bgcmmcyyyvpg9 16777242679 bgcmmcyyyvpg9 16777243391 bgcmmcyyyvpg9 167772441060 bgcmmcyyyvpg9 167772457 rows selected.SYS@EXDB1> !ss.sh test_pxq_hint2.sql 2 kso/ksostarting 2 copies of test_pxq_hint2.sql160

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

Saved successfully!

Ooh no, something went wrong!