SlideShare a Scribd company logo
Adaptive Query Optimization 
Oracle OpenWorld, 28 September 2014 
Christian Antognini 
BASEL BERN BRUGG LAUSANNE ZUERICH DUESSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MUNICH STUTTGART VIENNA 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
1
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
2 
@ChrisAntognini 
 Senior principal consultant, trainer and partner 
at Trivadis in Zurich (CH) 
 christian.antognini@trivadis.com 
 http://antognini.ch 
 Focus: get the most out of Oracle Database 
 Logical and physical database design 
 Query optimizer 
 Application performance management 
 Author of Troubleshooting Oracle Performance (Apress, 2008/2014) 
 OakTable Network, Oracle ACE Director
 Over the years Oracle has extremely improved the capabilities of the query 
2014 © Trivadis 
optimizer 
 Most of the improvements fall into one of the following areas 
 Enhance the quality of the inputs (e.g. objects statistics) 
 Make the gathering and management of object statistics easier and more efficient 
 Use new data structures 
 Implement or enhance query transformations 
 Improve plan stability 
 Cope with poor estimations that leads to poor execution plans 
 12c is no exception, every one of these areas were improved 
Adaptive Query Optimization 
28 September 2014 
3 
Introduction
 Adaptive plans (Enterprise Edition only) 
 Join methods 
 Parallel distribution methods 
 Star transformation 
 Adaptive statistics 
 SQL plan directives 
 Automatic reoptimization 
- Statistics feedback (evolution of cardinality feedback) 
- Performance feedback 
 Dynamic statistics (evolution of dynamic sampling) 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
4 
Adaptive Query Optimization Features
 Enables or disables adaptive query optimization features 
 Adaptive plans 
 SQL plan directives 
 Automatic reoptimization 
- It isn’t the case in 12.1.0.1 (bug 16824474) 
 The default value is TRUE 
 OPTIMIZER_DYNAMIC_SAMPLING controls dynamic statistics 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
5 
OPTIMIZER_ADAPTIVE_FEATURES
 Enables or disables reporting mode for adaptive query optimization features 
 Useful to assess how an execution plan would change 
 Use DBMS_XPLAN to get detail information about the analysis 
 Might fail with an ORA-1001 (bug 17270605) 
 The default value is FALSE 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
6 
OPTIMIZER_ADAPTIVE_REPORTING_ONLY 
SELECT * 
FROM table(dbms_xplan.display_cursor(format=>'report'))
 Object statistics don’t always provide sufficient information to find an optimal 
execution plan 
 To get additional insights, the query optimizer can take advantage of features 
like dynamic sampling and cardinality feedback 
 Don’t solve all issues, though 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
7 
Adaptive Plans – Challenge
 As of 12c, the query optimizer can postpone some decisions until the execution 
2014 © Trivadis 
phase 
 The idea is to leverage information collected while executing part of an 
execution plan to determine how another part should be carried out 
 The query optimizer uses adaptive plans in three situations: 
 To switch the join method from a nested loops join to a hash join and vice versa 
 To switch the PX distribution method from hash to broadcast/round-robin 
 To disable the access to a dimension for execution plans using the star transformation 
Adaptive Query Optimization 
28 September 2014 
8 
Adaptive Plans – Concept
 The query optimizer adds subplans to execution plans 
 One represents the nested loops join, the other the hash join 
 One of the alternatives is the default plan 
 One of the subplans is chosen during the first execution 
 The choice is based on the number of rows actually processed 
 The query optimizer computes an inflection point 
 A new row source operation is used to partially buffer and count the rows 
 STATISTICS COLLECTOR 
 Limitation: if a too large buffer is required, no adaptive plan is used 
 The execution plan that is actually executed is called the final plan 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
9 
Adaptive Plans – Join Method Switch
Adaptive Plans – Join Method Switch Example 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
10 
SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.n = 666 
----------------------------------------------- 
| Id | Operation | Name | 
----------------------------------------------- 
| 0 | SELECT STATEMENT | | 
| 1 | HASH JOIN | | 
| 2 | NESTED LOOPS | | 
| 3 | NESTED LOOPS | | 
| 4 | STATISTICS COLLECTOR | | 
| 5 | TABLE ACCESS FULL | T1 | 
| 6 | INDEX UNIQUE SCAN | T2_PK | 
| 7 | TABLE ACCESS BY INDEX ROWID| T2 | 
| 8 | TABLE ACCESS FULL | T2 | 
----------------------------------------------- 
adaptive_plan.sql
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
11 
Adaptive Plans – Join Method Switch Example 
SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.n = 666 
----------------------------------------------- 
| Id | Operation | Name | 
----------------------------------------------- 
| 0 | SELECT STATEMENT | | 
| 1 | HASH JOIN | | 
| 2 | NESTED LOOPS | | 
| 3 | NESTED LOOPS | | 
| 4 | STATISTICS COLLECTOR | | 
| 5 | TABLE ACCESS FULL | T1 | 
| 6 | INDEX UNIQUE SCAN | T2_PK | 
| 7 | TABLE ACCESS BY INDEX ROWID| T2 | 
| 8 | TABLE ACCESS FULL | T2 | 
----------------------------------------------- 
adaptive_plan.sql
Adaptive Plans – Join Method Switch Example 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
12 
SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.n = 666 
----------------------------------------------- 
| Id | Operation | Name | 
----------------------------------------------- 
| 0 | SELECT STATEMENT | | 
| 1 | HASH JOIN | | 
| 2 | NESTED LOOPS | | 
| 3 | NESTED LOOPS | | 
| 4 | STATISTICS COLLECTOR | | 
| 5 | TABLE ACCESS FULL | T1 | 
| 6 | INDEX UNIQUE SCAN | T2_PK | 
| 7 | TABLE ACCESS BY INDEX ROWID| T2 | 
| 8 | TABLE ACCESS FULL | T2 | 
----------------------------------------------- 
adaptive_plan.sql
Adaptive Plans – Join Method Switch Inflection Point 
 For both join methods, the cost associated to different cardinalities is estimated 
 The cardinality of the outer table varies 
 The cardinality of the inner table remains fixed 
 The query optimizer uses a binary search 
 The search takes place between a minimum and maximum cardinality 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
13
Adaptive Plans – Join Method Switch Inflection Point Example 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
14 
20,000 
2,000 
200 
20 
Cost 
Cardinality 
(In Order of Execution) 
Nested Loops Join 
Hash Join
Adaptive Plans – Parallel Distribution Method 
 New distribution method HYBRID HASH 
 It helps avoiding some data skewing problems 
 The actual distribution method is chosen at execution time 
 STATISTICS COLLECTOR 
 The decision takes place during each execution 
 Number of rows < 2 * DOP 
 Left input: BROADCAST / Right input: ROUND-ROBIN 
 Number of rows ≥ 2 * DOP 
 Left input: HASH / Right input: HASH 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
15
Adaptive Plans – Parallel Distribution Method Example 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
16 
hybrid_hash.sql 
------------------------------------------------------------------------ 
| Operation | Name | TQ |IN-OUT| PQ Distrib | 
------------------------------------------------------------------------ 
| SELECT STATEMENT | | | | | 
| SORT AGGREGATE | | | | | 
| PX COORDINATOR | | | | | 
| PX SEND QC (RANDOM) | :TQ10002 | Q1,02 | P->S | QC (RAND) | 
| SORT AGGREGATE | | Q1,02 | PCWP | | 
| HASH JOIN | | Q1,02 | PCWP | | 
| PX RECEIVE | | Q1,02 | PCWP | | 
| PX SEND HYBRID HASH | :TQ10000 | Q1,00 | P->P | HYBRID HASH| 
| STATISTICS COLLECTOR | | Q1,00 | PCWC | | 
| PX BLOCK ITERATOR | | Q1,00 | PCWC | | 
| TABLE ACCESS FULL | T1 | Q1,00 | PCWP | | 
| PX RECEIVE | | Q1,02 | PCWP | | 
| PX SEND HYBRID HASH | :TQ10001 | Q1,01 | P->P | HYBRID HASH| 
| PX BLOCK ITERATOR | | Q1,01 | PCWC | | 
| TABLE ACCESS FULL | T2 | Q1,01 | PCWP | | 
------------------------------------------------------------------------
Adaptive Plans – Star Transformation 
 With the star transformation, the data of each dimension that has a restriction 
applied to it might be “joined” to the corresponding bitmap index of the fact 
 If the number of rowids returned by such a “join” is underestimated, applying the 
filter can be detrimental to the performance 
 With an adaptive plan the access to some dimensions can be disabled 
 Decision takes place during the first execution only 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
17
Adaptive Plans – Star Transformation Example 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
18 
----------------------------------------------------- 
| Operation | Name | 
----------------------------------------------------- 
| … | | 
| VIEW | VW_ST_5497B905 | 
| NESTED LOOPS | | 
| BITMAP CONVERSION TO ROWIDS | | 
| BITMAP AND | | 
| BITMAP MERGE | | 
| BITMAP KEY ITERATION | | 
| TABLE ACCESS FULL | COLORS | 
| BITMAP INDEX RANGE SCAN | CAR_COLOR_IDX | 
| STATISTICS COLLECTOR | | 
| BITMAP MERGE | | 
| BITMAP KEY ITERATION | | 
| TABLE ACCESS FULL | MODELS | 
| BITMAP INDEX RANGE SCAN| CAR_MODEL_IDX | 
| … | | 
| TABLE ACCESS BY USER ROWID | CARS | 
-----------------------------------------------------
Adaptive Plans – V$SQL.IS_RESOLVED_ADAPTIVE_PLAN 
 NULL means that the execution plan associated to the cursor isn’t adaptive 
 N means that the final execution plan hasn’t been determined 
 Y means that the final execution plan was determined 
 Also set if reporting mode is enabled 
 Set for join method switches and star transformation only 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
19
Adaptive Statistics – SQL Plan Directives 
 SQL plan directives are automatically created when misestimates occur 
 They are temporarily stored in the SGA and flushed to disk every 15 min by a 
background process 
 They aren’t tied to a specific SQL statement, but to specific tables/columns 
 Several of them can be used for a single SQL statement 
 They instruct the database engine to automatically create extended statistics 
 Only column groups are considered 
 The limit of 20 extensions applies to them as well 
 If creating extended statistics isn’t supported/possible/sensible, they instruct the query 
optimizer to use dynamic sampling 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
20
Adaptive Statistics – Management of SQL Plan Directives 
 The database engine automatically maintains SQL plan directives 
 They are automatically created 
 They are automatically purged if not used (by default after 53 weeks) 
 They can be manually managed through DBMS_SPD 
 Flush to disk SQL plan directives temporarily stored in the SGA 
 Change retention period 
 Immediate purge 
 Alter attributes (ENABLED, AUTO_DROP) 
 Pack/Unpack 
 Requirement: ADMINISTER SQL MANAGEMENT OBJECT privilege 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
21
Adaptive Statistics – SQL Plan Directives in the Data Dictionary 
 DBA_SQL_PLAN_DIRECTIVES 
 DBA_SQL_PLAN_DIR_OBJECTS 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
22 
SQL> SELECT type, reason, count(*) 
2 FROM dba_sql_plan_directives 
3 GROUP BY type, reason; 
TYPE REASON COUNT(*) 
---------------- ------------------------------------ ---------- 
DYNAMIC_SAMPLING SINGLE TABLE CARDINALITY MISESTIMATE 81 
DYNAMIC_SAMPLING JOIN CARDINALITY MISESTIMATE 180 
DYNAMIC_SAMPLING GROUP BY CARDINALITY MISESTIMATE 6
Adaptive Statistics – Statistics Feedback 
 Evolution of cardinality feedback 
 Used for single-table cardinalities as well as join cardinalities 
 Information about misestimates might be persisted through SQL plan directives 
 For misestimates due to table functions no information is stored 
 V$SQL.IS_REOPTIMIZABLE 
 Y means that the next execution will trigger a reoptimization 
 N means that no reoptimization is necessary 
 R means that reoptimization information is available, but reporting mode was enabled 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
23 
statistics_feedback1.sql 
statistics_feedback2.sql
Adaptive Statistics – Performance Feedback 
 Enabled when PARALLEL_DEGREE_POLICY = ADAPTIVE 
 Assessment of the auto DOP after the first execution 
 If auto DOP is suboptimal, the next execution will trigger a reoptimization 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
24
Adaptive Statistics – Dynamic Statistics 
 Evolution of dynamic sampling 
 Used for single-table cardinalities as well as join and group-by cardinalities 
 The query optimizer decides when and how to use dynamic statistics 
 The data collected through dynamic statistics is shared through the result cache 
 The sampling can’t exceed a given amount of time 
 The maximum is determined based on past executions (cursor cache, AWR) 
 To use the new features OPTIMIZER_DYNAMIC_SAMPLING has to be set to 11 
2014 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
25 
dynamic_statistics.sql
Summary 
2014 © Trivadis 
 Adaptive query optimization 
introduced a number of very 
interesting features 
 The query optimizer is getting more 
and more dynamic 
Adaptive Query Optimization 
28 September 2014 
26
Questions and answers ... 
Christian Antognini 
Senior Principal Consultant 
christian.antognini@trivadis.com 
BASEL BERN BRUGG LAUSANNE ZUERICH DUESSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MUNICH STUTTGART VIENNA 
2014 2013 © Trivadis 
Adaptive Query Optimization 
28 September 2014 
27

More Related Content

What's hot

PostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability ImprovementsPostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability Improvements
PGConf APAC
 
Query optimizer vivek sharma
Query optimizer vivek sharmaQuery optimizer vivek sharma
Query optimizer vivek sharma
aioughydchapter
 
Presentation v mware roi tco calculator
Presentation   v mware roi tco calculatorPresentation   v mware roi tco calculator
Presentation v mware roi tco calculator
solarisyourep
 
Dan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New FeaturesDan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New Features
Embarcadero Technologies
 
Accumulo Summit 2015: Performance Models for Apache Accumulo: The Heavy Tail ...
Accumulo Summit 2015: Performance Models for Apache Accumulo: The Heavy Tail ...Accumulo Summit 2015: Performance Models for Apache Accumulo: The Heavy Tail ...
Accumulo Summit 2015: Performance Models for Apache Accumulo: The Heavy Tail ...
Accumulo Summit
 
Indexing in Exadata
Indexing in ExadataIndexing in Exadata
Indexing in Exadata
Enkitec
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
John Beresniewicz
 
Oracle Database 12c features for DBA
Oracle Database 12c features for DBAOracle Database 12c features for DBA
Oracle Database 12c features for DBA
Karan Kukreja
 
Whitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success StoryWhitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success Story
Kristofferson A
 
Indexing Strategies for Oracle Databases - Beyond the Create Index Statement
Indexing Strategies for Oracle Databases - Beyond the Create Index StatementIndexing Strategies for Oracle Databases - Beyond the Create Index Statement
Indexing Strategies for Oracle Databases - Beyond the Create Index Statement
Sean Scott
 
Create your oracle_apps_r12_lab_with_less_than_us1000
Create your oracle_apps_r12_lab_with_less_than_us1000Create your oracle_apps_r12_lab_with_less_than_us1000
Create your oracle_apps_r12_lab_with_less_than_us1000
Ajith Narayanan
 
Crack the complexity of oracle applications r12 workload v2
Crack the complexity of oracle applications r12 workload v2Crack the complexity of oracle applications r12 workload v2
Crack the complexity of oracle applications r12 workload v2
Ajith Narayanan
 
PostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingPostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / Sharding
Amir Reza Hashemi
 
DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4
Pranav Prakash
 
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_questionWhy is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
Ajith Narayanan
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
Guy Harrison
 
Best Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle OptimizerBest Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle Optimizer
Edgar Alejandro Villegas
 
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Guatemala User Group
 
TPC-H Column Store and MPP systems
TPC-H Column Store and MPP systemsTPC-H Column Store and MPP systems
TPC-H Column Store and MPP systems
Mostafa Mokhtar
 
VirtaThon 2011 - Mining the AWR
VirtaThon 2011 - Mining the AWRVirtaThon 2011 - Mining the AWR
VirtaThon 2011 - Mining the AWR
Kristofferson A
 

What's hot (20)

PostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability ImprovementsPostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability Improvements
 
Query optimizer vivek sharma
Query optimizer vivek sharmaQuery optimizer vivek sharma
Query optimizer vivek sharma
 
Presentation v mware roi tco calculator
Presentation   v mware roi tco calculatorPresentation   v mware roi tco calculator
Presentation v mware roi tco calculator
 
Dan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New FeaturesDan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New Features
 
Accumulo Summit 2015: Performance Models for Apache Accumulo: The Heavy Tail ...
Accumulo Summit 2015: Performance Models for Apache Accumulo: The Heavy Tail ...Accumulo Summit 2015: Performance Models for Apache Accumulo: The Heavy Tail ...
Accumulo Summit 2015: Performance Models for Apache Accumulo: The Heavy Tail ...
 
Indexing in Exadata
Indexing in ExadataIndexing in Exadata
Indexing in Exadata
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
 
Oracle Database 12c features for DBA
Oracle Database 12c features for DBAOracle Database 12c features for DBA
Oracle Database 12c features for DBA
 
Whitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success StoryWhitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success Story
 
Indexing Strategies for Oracle Databases - Beyond the Create Index Statement
Indexing Strategies for Oracle Databases - Beyond the Create Index StatementIndexing Strategies for Oracle Databases - Beyond the Create Index Statement
Indexing Strategies for Oracle Databases - Beyond the Create Index Statement
 
Create your oracle_apps_r12_lab_with_less_than_us1000
Create your oracle_apps_r12_lab_with_less_than_us1000Create your oracle_apps_r12_lab_with_less_than_us1000
Create your oracle_apps_r12_lab_with_less_than_us1000
 
Crack the complexity of oracle applications r12 workload v2
Crack the complexity of oracle applications r12 workload v2Crack the complexity of oracle applications r12 workload v2
Crack the complexity of oracle applications r12 workload v2
 
PostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingPostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / Sharding
 
DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4
 
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_questionWhy is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
Best Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle OptimizerBest Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle Optimizer
 
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
 
TPC-H Column Store and MPP systems
TPC-H Column Store and MPP systemsTPC-H Column Store and MPP systems
TPC-H Column Store and MPP systems
 
VirtaThon 2011 - Mining the AWR
VirtaThon 2011 - Mining the AWRVirtaThon 2011 - Mining the AWR
VirtaThon 2011 - Mining the AWR
 

Viewers also liked

Free Load Testing Tools for Oracle Database – Which One Do I Use?
Free Load Testing Tools for Oracle Database – Which One Do I Use?Free Load Testing Tools for Oracle Database – Which One Do I Use?
Free Load Testing Tools for Oracle Database – Which One Do I Use?
Christian Antognini
 
The Features That (maybe) You Didn't Know About
The Features That (maybe) You Didn't Know AboutThe Features That (maybe) You Didn't Know About
The Features That (maybe) You Didn't Know About
Oren Nakdimon
 
Oracle ACFS High Availability NFS Services (HANFS)
Oracle ACFS High Availability NFS Services (HANFS)Oracle ACFS High Availability NFS Services (HANFS)
Oracle ACFS High Availability NFS Services (HANFS)
Anju Garg
 
Policy based cluster management in oracle 12c
Policy based cluster management in oracle 12c Policy based cluster management in oracle 12c
Policy based cluster management in oracle 12c
Anju Garg
 
Indexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cIndexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12c
Oren Nakdimon
 
DevOps and its impact
DevOps and its impactDevOps and its impact
DevOps and its impact
Cisco DevNet
 

Viewers also liked (6)

Free Load Testing Tools for Oracle Database – Which One Do I Use?
Free Load Testing Tools for Oracle Database – Which One Do I Use?Free Load Testing Tools for Oracle Database – Which One Do I Use?
Free Load Testing Tools for Oracle Database – Which One Do I Use?
 
The Features That (maybe) You Didn't Know About
The Features That (maybe) You Didn't Know AboutThe Features That (maybe) You Didn't Know About
The Features That (maybe) You Didn't Know About
 
Oracle ACFS High Availability NFS Services (HANFS)
Oracle ACFS High Availability NFS Services (HANFS)Oracle ACFS High Availability NFS Services (HANFS)
Oracle ACFS High Availability NFS Services (HANFS)
 
Policy based cluster management in oracle 12c
Policy based cluster management in oracle 12c Policy based cluster management in oracle 12c
Policy based cluster management in oracle 12c
 
Indexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cIndexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12c
 
DevOps and its impact
DevOps and its impactDevOps and its impact
DevOps and its impact
 

Similar to Adaptive Query Optimization

Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Nelson Calero
 
Part1 of SQL Tuning Workshop - Understanding the Optimizer
Part1 of SQL Tuning Workshop - Understanding the OptimizerPart1 of SQL Tuning Workshop - Understanding the Optimizer
Part1 of SQL Tuning Workshop - Understanding the Optimizer
Maria Colgan
 
Sql and PL/SQL Best Practices I
Sql and PL/SQL Best Practices ISql and PL/SQL Best Practices I
Sql and PL/SQL Best Practices I
Carlos Oliveira
 
Adaptive Query Optimization in 12c
Adaptive Query Optimization in 12cAdaptive Query Optimization in 12c
Adaptive Query Optimization in 12c
Anju Garg
 
Balancing the line by using heuristic method based on cpm in salbp –a case study
Balancing the line by using heuristic method based on cpm in salbp –a case studyBalancing the line by using heuristic method based on cpm in salbp –a case study
Balancing the line by using heuristic method based on cpm in salbp –a case study
eSAT Journals
 
Sydney Oracle Meetup - access paths
Sydney Oracle Meetup - access pathsSydney Oracle Meetup - access paths
Sydney Oracle Meetup - access paths
paulguerin
 
Randolf Geist – IT-Tage 2015 – Oracle Parallel Execution – Analyse und Troubl...
Randolf Geist – IT-Tage 2015 – Oracle Parallel Execution – Analyse und Troubl...Randolf Geist – IT-Tage 2015 – Oracle Parallel Execution – Analyse und Troubl...
Randolf Geist – IT-Tage 2015 – Oracle Parallel Execution – Analyse und Troubl...
Informatik Aktuell
 
OracleDatabase12cPXNewFeatures_ITOUG_2018.pdf
OracleDatabase12cPXNewFeatures_ITOUG_2018.pdfOracleDatabase12cPXNewFeatures_ITOUG_2018.pdf
OracleDatabase12cPXNewFeatures_ITOUG_2018.pdf
7vkx8892hv
 
241802936-Oracle-Demand-to-Plan-Overview.pptx
241802936-Oracle-Demand-to-Plan-Overview.pptx241802936-Oracle-Demand-to-Plan-Overview.pptx
241802936-Oracle-Demand-to-Plan-Overview.pptx
sathishkumar776149
 
Scheduling of Heterogeneous Tasks in Cloud Computing using Multi Queue (MQ) A...
Scheduling of Heterogeneous Tasks in Cloud Computing using Multi Queue (MQ) A...Scheduling of Heterogeneous Tasks in Cloud Computing using Multi Queue (MQ) A...
Scheduling of Heterogeneous Tasks in Cloud Computing using Multi Queue (MQ) A...
IRJET Journal
 
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Peter Tröger
 
Hybrid Task Scheduling Approach using Gravitational and ACO Search Algorithm
Hybrid Task Scheduling Approach using Gravitational and ACO Search AlgorithmHybrid Task Scheduling Approach using Gravitational and ACO Search Algorithm
Hybrid Task Scheduling Approach using Gravitational and ACO Search Algorithm
IRJET Journal
 
Proactive Scheduling in Cloud Computing
Proactive Scheduling in Cloud ComputingProactive Scheduling in Cloud Computing
Proactive Scheduling in Cloud Computing
journalBEEI
 
Architecting for Sustainability
Architecting for SustainabilityArchitecting for Sustainability
Architecting for Sustainability
ssuserd4e0d2
 
My Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cMy Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12c
Nelson Calero
 
Analysing and troubleshooting Parallel Execution IT Tage 2015
Analysing and troubleshooting Parallel Execution IT Tage 2015Analysing and troubleshooting Parallel Execution IT Tage 2015
Analysing and troubleshooting Parallel Execution IT Tage 2015
Randolf Geist
 
Five Tips to Get the Most Out of Your Indexing
Five Tips to Get the Most Out of Your IndexingFive Tips to Get the Most Out of Your Indexing
Five Tips to Get the Most Out of Your Indexing
Maria Colgan
 
IRJET- Fitness Function as Trust Value using to Efficient Multipath Routi...
IRJET-  	  Fitness Function as Trust Value using to Efficient Multipath Routi...IRJET-  	  Fitness Function as Trust Value using to Efficient Multipath Routi...
IRJET- Fitness Function as Trust Value using to Efficient Multipath Routi...
IRJET Journal
 
Hash joins and bloom filters at AMIS25
Hash joins and bloom filters at AMIS25Hash joins and bloom filters at AMIS25
Hash joins and bloom filters at AMIS25
Getting value from IoT, Integration and Data Analytics
 
Svm Classifier Algorithm for Data Stream Mining Using Hive and R
Svm Classifier Algorithm for Data Stream Mining Using Hive and RSvm Classifier Algorithm for Data Stream Mining Using Hive and R
Svm Classifier Algorithm for Data Stream Mining Using Hive and R
IRJET Journal
 

Similar to Adaptive Query Optimization (20)

Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
 
Part1 of SQL Tuning Workshop - Understanding the Optimizer
Part1 of SQL Tuning Workshop - Understanding the OptimizerPart1 of SQL Tuning Workshop - Understanding the Optimizer
Part1 of SQL Tuning Workshop - Understanding the Optimizer
 
Sql and PL/SQL Best Practices I
Sql and PL/SQL Best Practices ISql and PL/SQL Best Practices I
Sql and PL/SQL Best Practices I
 
Adaptive Query Optimization in 12c
Adaptive Query Optimization in 12cAdaptive Query Optimization in 12c
Adaptive Query Optimization in 12c
 
Balancing the line by using heuristic method based on cpm in salbp –a case study
Balancing the line by using heuristic method based on cpm in salbp –a case studyBalancing the line by using heuristic method based on cpm in salbp –a case study
Balancing the line by using heuristic method based on cpm in salbp –a case study
 
Sydney Oracle Meetup - access paths
Sydney Oracle Meetup - access pathsSydney Oracle Meetup - access paths
Sydney Oracle Meetup - access paths
 
Randolf Geist – IT-Tage 2015 – Oracle Parallel Execution – Analyse und Troubl...
Randolf Geist – IT-Tage 2015 – Oracle Parallel Execution – Analyse und Troubl...Randolf Geist – IT-Tage 2015 – Oracle Parallel Execution – Analyse und Troubl...
Randolf Geist – IT-Tage 2015 – Oracle Parallel Execution – Analyse und Troubl...
 
OracleDatabase12cPXNewFeatures_ITOUG_2018.pdf
OracleDatabase12cPXNewFeatures_ITOUG_2018.pdfOracleDatabase12cPXNewFeatures_ITOUG_2018.pdf
OracleDatabase12cPXNewFeatures_ITOUG_2018.pdf
 
241802936-Oracle-Demand-to-Plan-Overview.pptx
241802936-Oracle-Demand-to-Plan-Overview.pptx241802936-Oracle-Demand-to-Plan-Overview.pptx
241802936-Oracle-Demand-to-Plan-Overview.pptx
 
Scheduling of Heterogeneous Tasks in Cloud Computing using Multi Queue (MQ) A...
Scheduling of Heterogeneous Tasks in Cloud Computing using Multi Queue (MQ) A...Scheduling of Heterogeneous Tasks in Cloud Computing using Multi Queue (MQ) A...
Scheduling of Heterogeneous Tasks in Cloud Computing using Multi Queue (MQ) A...
 
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
 
Hybrid Task Scheduling Approach using Gravitational and ACO Search Algorithm
Hybrid Task Scheduling Approach using Gravitational and ACO Search AlgorithmHybrid Task Scheduling Approach using Gravitational and ACO Search Algorithm
Hybrid Task Scheduling Approach using Gravitational and ACO Search Algorithm
 
Proactive Scheduling in Cloud Computing
Proactive Scheduling in Cloud ComputingProactive Scheduling in Cloud Computing
Proactive Scheduling in Cloud Computing
 
Architecting for Sustainability
Architecting for SustainabilityArchitecting for Sustainability
Architecting for Sustainability
 
My Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cMy Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12c
 
Analysing and troubleshooting Parallel Execution IT Tage 2015
Analysing and troubleshooting Parallel Execution IT Tage 2015Analysing and troubleshooting Parallel Execution IT Tage 2015
Analysing and troubleshooting Parallel Execution IT Tage 2015
 
Five Tips to Get the Most Out of Your Indexing
Five Tips to Get the Most Out of Your IndexingFive Tips to Get the Most Out of Your Indexing
Five Tips to Get the Most Out of Your Indexing
 
IRJET- Fitness Function as Trust Value using to Efficient Multipath Routi...
IRJET-  	  Fitness Function as Trust Value using to Efficient Multipath Routi...IRJET-  	  Fitness Function as Trust Value using to Efficient Multipath Routi...
IRJET- Fitness Function as Trust Value using to Efficient Multipath Routi...
 
Hash joins and bloom filters at AMIS25
Hash joins and bloom filters at AMIS25Hash joins and bloom filters at AMIS25
Hash joins and bloom filters at AMIS25
 
Svm Classifier Algorithm for Data Stream Mining Using Hive and R
Svm Classifier Algorithm for Data Stream Mining Using Hive and RSvm Classifier Algorithm for Data Stream Mining Using Hive and R
Svm Classifier Algorithm for Data Stream Mining Using Hive and R
 

Recently uploaded

zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Adaptive Query Optimization

  • 1. Adaptive Query Optimization Oracle OpenWorld, 28 September 2014 Christian Antognini BASEL BERN BRUGG LAUSANNE ZUERICH DUESSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MUNICH STUTTGART VIENNA 2014 © Trivadis Adaptive Query Optimization 28 September 2014 1
  • 2. 2014 © Trivadis Adaptive Query Optimization 28 September 2014 2 @ChrisAntognini  Senior principal consultant, trainer and partner at Trivadis in Zurich (CH)  christian.antognini@trivadis.com  http://antognini.ch  Focus: get the most out of Oracle Database  Logical and physical database design  Query optimizer  Application performance management  Author of Troubleshooting Oracle Performance (Apress, 2008/2014)  OakTable Network, Oracle ACE Director
  • 3.  Over the years Oracle has extremely improved the capabilities of the query 2014 © Trivadis optimizer  Most of the improvements fall into one of the following areas  Enhance the quality of the inputs (e.g. objects statistics)  Make the gathering and management of object statistics easier and more efficient  Use new data structures  Implement or enhance query transformations  Improve plan stability  Cope with poor estimations that leads to poor execution plans  12c is no exception, every one of these areas were improved Adaptive Query Optimization 28 September 2014 3 Introduction
  • 4.  Adaptive plans (Enterprise Edition only)  Join methods  Parallel distribution methods  Star transformation  Adaptive statistics  SQL plan directives  Automatic reoptimization - Statistics feedback (evolution of cardinality feedback) - Performance feedback  Dynamic statistics (evolution of dynamic sampling) 2014 © Trivadis Adaptive Query Optimization 28 September 2014 4 Adaptive Query Optimization Features
  • 5.  Enables or disables adaptive query optimization features  Adaptive plans  SQL plan directives  Automatic reoptimization - It isn’t the case in 12.1.0.1 (bug 16824474)  The default value is TRUE  OPTIMIZER_DYNAMIC_SAMPLING controls dynamic statistics 2014 © Trivadis Adaptive Query Optimization 28 September 2014 5 OPTIMIZER_ADAPTIVE_FEATURES
  • 6.  Enables or disables reporting mode for adaptive query optimization features  Useful to assess how an execution plan would change  Use DBMS_XPLAN to get detail information about the analysis  Might fail with an ORA-1001 (bug 17270605)  The default value is FALSE 2014 © Trivadis Adaptive Query Optimization 28 September 2014 6 OPTIMIZER_ADAPTIVE_REPORTING_ONLY SELECT * FROM table(dbms_xplan.display_cursor(format=>'report'))
  • 7.  Object statistics don’t always provide sufficient information to find an optimal execution plan  To get additional insights, the query optimizer can take advantage of features like dynamic sampling and cardinality feedback  Don’t solve all issues, though 2014 © Trivadis Adaptive Query Optimization 28 September 2014 7 Adaptive Plans – Challenge
  • 8.  As of 12c, the query optimizer can postpone some decisions until the execution 2014 © Trivadis phase  The idea is to leverage information collected while executing part of an execution plan to determine how another part should be carried out  The query optimizer uses adaptive plans in three situations:  To switch the join method from a nested loops join to a hash join and vice versa  To switch the PX distribution method from hash to broadcast/round-robin  To disable the access to a dimension for execution plans using the star transformation Adaptive Query Optimization 28 September 2014 8 Adaptive Plans – Concept
  • 9.  The query optimizer adds subplans to execution plans  One represents the nested loops join, the other the hash join  One of the alternatives is the default plan  One of the subplans is chosen during the first execution  The choice is based on the number of rows actually processed  The query optimizer computes an inflection point  A new row source operation is used to partially buffer and count the rows  STATISTICS COLLECTOR  Limitation: if a too large buffer is required, no adaptive plan is used  The execution plan that is actually executed is called the final plan 2014 © Trivadis Adaptive Query Optimization 28 September 2014 9 Adaptive Plans – Join Method Switch
  • 10. Adaptive Plans – Join Method Switch Example 2014 © Trivadis Adaptive Query Optimization 28 September 2014 10 SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.n = 666 ----------------------------------------------- | Id | Operation | Name | ----------------------------------------------- | 0 | SELECT STATEMENT | | | 1 | HASH JOIN | | | 2 | NESTED LOOPS | | | 3 | NESTED LOOPS | | | 4 | STATISTICS COLLECTOR | | | 5 | TABLE ACCESS FULL | T1 | | 6 | INDEX UNIQUE SCAN | T2_PK | | 7 | TABLE ACCESS BY INDEX ROWID| T2 | | 8 | TABLE ACCESS FULL | T2 | ----------------------------------------------- adaptive_plan.sql
  • 11. 2014 © Trivadis Adaptive Query Optimization 28 September 2014 11 Adaptive Plans – Join Method Switch Example SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.n = 666 ----------------------------------------------- | Id | Operation | Name | ----------------------------------------------- | 0 | SELECT STATEMENT | | | 1 | HASH JOIN | | | 2 | NESTED LOOPS | | | 3 | NESTED LOOPS | | | 4 | STATISTICS COLLECTOR | | | 5 | TABLE ACCESS FULL | T1 | | 6 | INDEX UNIQUE SCAN | T2_PK | | 7 | TABLE ACCESS BY INDEX ROWID| T2 | | 8 | TABLE ACCESS FULL | T2 | ----------------------------------------------- adaptive_plan.sql
  • 12. Adaptive Plans – Join Method Switch Example 2014 © Trivadis Adaptive Query Optimization 28 September 2014 12 SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.n = 666 ----------------------------------------------- | Id | Operation | Name | ----------------------------------------------- | 0 | SELECT STATEMENT | | | 1 | HASH JOIN | | | 2 | NESTED LOOPS | | | 3 | NESTED LOOPS | | | 4 | STATISTICS COLLECTOR | | | 5 | TABLE ACCESS FULL | T1 | | 6 | INDEX UNIQUE SCAN | T2_PK | | 7 | TABLE ACCESS BY INDEX ROWID| T2 | | 8 | TABLE ACCESS FULL | T2 | ----------------------------------------------- adaptive_plan.sql
  • 13. Adaptive Plans – Join Method Switch Inflection Point  For both join methods, the cost associated to different cardinalities is estimated  The cardinality of the outer table varies  The cardinality of the inner table remains fixed  The query optimizer uses a binary search  The search takes place between a minimum and maximum cardinality 2014 © Trivadis Adaptive Query Optimization 28 September 2014 13
  • 14. Adaptive Plans – Join Method Switch Inflection Point Example 2014 © Trivadis Adaptive Query Optimization 28 September 2014 14 20,000 2,000 200 20 Cost Cardinality (In Order of Execution) Nested Loops Join Hash Join
  • 15. Adaptive Plans – Parallel Distribution Method  New distribution method HYBRID HASH  It helps avoiding some data skewing problems  The actual distribution method is chosen at execution time  STATISTICS COLLECTOR  The decision takes place during each execution  Number of rows < 2 * DOP  Left input: BROADCAST / Right input: ROUND-ROBIN  Number of rows ≥ 2 * DOP  Left input: HASH / Right input: HASH 2014 © Trivadis Adaptive Query Optimization 28 September 2014 15
  • 16. Adaptive Plans – Parallel Distribution Method Example 2014 © Trivadis Adaptive Query Optimization 28 September 2014 16 hybrid_hash.sql ------------------------------------------------------------------------ | Operation | Name | TQ |IN-OUT| PQ Distrib | ------------------------------------------------------------------------ | SELECT STATEMENT | | | | | | SORT AGGREGATE | | | | | | PX COORDINATOR | | | | | | PX SEND QC (RANDOM) | :TQ10002 | Q1,02 | P->S | QC (RAND) | | SORT AGGREGATE | | Q1,02 | PCWP | | | HASH JOIN | | Q1,02 | PCWP | | | PX RECEIVE | | Q1,02 | PCWP | | | PX SEND HYBRID HASH | :TQ10000 | Q1,00 | P->P | HYBRID HASH| | STATISTICS COLLECTOR | | Q1,00 | PCWC | | | PX BLOCK ITERATOR | | Q1,00 | PCWC | | | TABLE ACCESS FULL | T1 | Q1,00 | PCWP | | | PX RECEIVE | | Q1,02 | PCWP | | | PX SEND HYBRID HASH | :TQ10001 | Q1,01 | P->P | HYBRID HASH| | PX BLOCK ITERATOR | | Q1,01 | PCWC | | | TABLE ACCESS FULL | T2 | Q1,01 | PCWP | | ------------------------------------------------------------------------
  • 17. Adaptive Plans – Star Transformation  With the star transformation, the data of each dimension that has a restriction applied to it might be “joined” to the corresponding bitmap index of the fact  If the number of rowids returned by such a “join” is underestimated, applying the filter can be detrimental to the performance  With an adaptive plan the access to some dimensions can be disabled  Decision takes place during the first execution only 2014 © Trivadis Adaptive Query Optimization 28 September 2014 17
  • 18. Adaptive Plans – Star Transformation Example 2014 © Trivadis Adaptive Query Optimization 28 September 2014 18 ----------------------------------------------------- | Operation | Name | ----------------------------------------------------- | … | | | VIEW | VW_ST_5497B905 | | NESTED LOOPS | | | BITMAP CONVERSION TO ROWIDS | | | BITMAP AND | | | BITMAP MERGE | | | BITMAP KEY ITERATION | | | TABLE ACCESS FULL | COLORS | | BITMAP INDEX RANGE SCAN | CAR_COLOR_IDX | | STATISTICS COLLECTOR | | | BITMAP MERGE | | | BITMAP KEY ITERATION | | | TABLE ACCESS FULL | MODELS | | BITMAP INDEX RANGE SCAN| CAR_MODEL_IDX | | … | | | TABLE ACCESS BY USER ROWID | CARS | -----------------------------------------------------
  • 19. Adaptive Plans – V$SQL.IS_RESOLVED_ADAPTIVE_PLAN  NULL means that the execution plan associated to the cursor isn’t adaptive  N means that the final execution plan hasn’t been determined  Y means that the final execution plan was determined  Also set if reporting mode is enabled  Set for join method switches and star transformation only 2014 © Trivadis Adaptive Query Optimization 28 September 2014 19
  • 20. Adaptive Statistics – SQL Plan Directives  SQL plan directives are automatically created when misestimates occur  They are temporarily stored in the SGA and flushed to disk every 15 min by a background process  They aren’t tied to a specific SQL statement, but to specific tables/columns  Several of them can be used for a single SQL statement  They instruct the database engine to automatically create extended statistics  Only column groups are considered  The limit of 20 extensions applies to them as well  If creating extended statistics isn’t supported/possible/sensible, they instruct the query optimizer to use dynamic sampling 2014 © Trivadis Adaptive Query Optimization 28 September 2014 20
  • 21. Adaptive Statistics – Management of SQL Plan Directives  The database engine automatically maintains SQL plan directives  They are automatically created  They are automatically purged if not used (by default after 53 weeks)  They can be manually managed through DBMS_SPD  Flush to disk SQL plan directives temporarily stored in the SGA  Change retention period  Immediate purge  Alter attributes (ENABLED, AUTO_DROP)  Pack/Unpack  Requirement: ADMINISTER SQL MANAGEMENT OBJECT privilege 2014 © Trivadis Adaptive Query Optimization 28 September 2014 21
  • 22. Adaptive Statistics – SQL Plan Directives in the Data Dictionary  DBA_SQL_PLAN_DIRECTIVES  DBA_SQL_PLAN_DIR_OBJECTS 2014 © Trivadis Adaptive Query Optimization 28 September 2014 22 SQL> SELECT type, reason, count(*) 2 FROM dba_sql_plan_directives 3 GROUP BY type, reason; TYPE REASON COUNT(*) ---------------- ------------------------------------ ---------- DYNAMIC_SAMPLING SINGLE TABLE CARDINALITY MISESTIMATE 81 DYNAMIC_SAMPLING JOIN CARDINALITY MISESTIMATE 180 DYNAMIC_SAMPLING GROUP BY CARDINALITY MISESTIMATE 6
  • 23. Adaptive Statistics – Statistics Feedback  Evolution of cardinality feedback  Used for single-table cardinalities as well as join cardinalities  Information about misestimates might be persisted through SQL plan directives  For misestimates due to table functions no information is stored  V$SQL.IS_REOPTIMIZABLE  Y means that the next execution will trigger a reoptimization  N means that no reoptimization is necessary  R means that reoptimization information is available, but reporting mode was enabled 2014 © Trivadis Adaptive Query Optimization 28 September 2014 23 statistics_feedback1.sql statistics_feedback2.sql
  • 24. Adaptive Statistics – Performance Feedback  Enabled when PARALLEL_DEGREE_POLICY = ADAPTIVE  Assessment of the auto DOP after the first execution  If auto DOP is suboptimal, the next execution will trigger a reoptimization 2014 © Trivadis Adaptive Query Optimization 28 September 2014 24
  • 25. Adaptive Statistics – Dynamic Statistics  Evolution of dynamic sampling  Used for single-table cardinalities as well as join and group-by cardinalities  The query optimizer decides when and how to use dynamic statistics  The data collected through dynamic statistics is shared through the result cache  The sampling can’t exceed a given amount of time  The maximum is determined based on past executions (cursor cache, AWR)  To use the new features OPTIMIZER_DYNAMIC_SAMPLING has to be set to 11 2014 © Trivadis Adaptive Query Optimization 28 September 2014 25 dynamic_statistics.sql
  • 26. Summary 2014 © Trivadis  Adaptive query optimization introduced a number of very interesting features  The query optimizer is getting more and more dynamic Adaptive Query Optimization 28 September 2014 26
  • 27. Questions and answers ... Christian Antognini Senior Principal Consultant christian.antognini@trivadis.com BASEL BERN BRUGG LAUSANNE ZUERICH DUESSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MUNICH STUTTGART VIENNA 2014 2013 © Trivadis Adaptive Query Optimization 28 September 2014 27