38

Oracle 12c Parallel Execution New Features

Embed Size (px)

Citation preview

Page 1: Oracle 12c Parallel Execution New Features
Page 2: Oracle 12c Parallel Execution New Features

Independent consultant

Performance Troubleshooting

In-house workshops

Cost-Based Optimizer

Performance By Design

Oracle ACE Director

Member of OakTable Network

Page 3: Oracle 12c Parallel Execution New Features

This session explains the new PX operators introduced with Oracle 12c so that you know

them next time you look at a 12c Parallel Execution plan

More info / details? On my blog (tag 12cR1, New Features, Parallel Execution)

You want more? Ask for my Parallel Execution Masterclass seminar

Page 4: Oracle 12c Parallel Execution New Features

Three important aspects of Parallel Execution

Major 12c Parallel Execution new features

Some more new 12c Parallel Execution features

Conclusion / Q & A

Page 5: Oracle 12c Parallel Execution New Features

Oracle Parallel Execution employs Producer Consumer Model

Parallel Execution plan organised in so called Data Flow Operations (DFOs) and DFO Trees

DFOs are organised in Parent child relations, the child produces / sends data, the parent consumes / receives data

Requires two sets of Parallel Execution Server

Page 6: Oracle 12c Parallel Execution New Features
Page 7: Oracle 12c Parallel Execution New Features
Page 8: Oracle 12c Parallel Execution New Features
Page 9: Oracle 12c Parallel Execution New Features
Page 10: Oracle 12c Parallel Execution New Features

Producer Consumer model limitation: Only one active pair of DFOs per DFO tree allowed

Depending on plan shape and operations multiple DFO pairs could be active

To prevent this Oracle adds artificial blocking operations that buffer data

=> Increased PGA / TEMP requirements

Page 11: Oracle 12c Parallel Execution New Features
Page 12: Oracle 12c Parallel Execution New Features

Producer consumer model means redistribution of data

Depending on distribution methods used and actual data pattern the data might not be distributed evenly

Data distribution skew means that some Parallel Execution Servers need to process more data than others

=> Not all PX Servers busy all the time

Page 13: Oracle 12c Parallel Execution New Features
Page 14: Oracle 12c Parallel Execution New Features
Page 15: Oracle 12c Parallel Execution New Features

Three important aspects of Parallel Execution

Major 12c Parallel Execution new features

Some more new 12c Parallel Execution features

Conclusion / Q & A

Page 16: Oracle 12c Parallel Execution New Features

New distribution method HYBRID HASH

Dynamic switch between BROADCAST and HASH at execution time

Can detect and address data distribution skew (current implementation only limited scope)

Only partially useful at present but is supposed to be improved in upcoming releases

Page 17: Oracle 12c Parallel Execution New Features
Page 18: Oracle 12c Parallel Execution New Features
Page 19: Oracle 12c Parallel Execution New Features
Page 20: Oracle 12c Parallel Execution New Features
Page 21: Oracle 12c Parallel Execution New Features

New feature CONCURRENT UNION ALL – executes multiple branches of a UNION ALL concurrently

Usually only relevant in case of serial branches (or mixture of parallel and serial branches)

New operator PX SELECTOR selects one of the available slaves to execute serial branch

Page 22: Oracle 12c Parallel Execution New Features
Page 23: Oracle 12c Parallel Execution New Features
Page 24: Oracle 12c Parallel Execution New Features

New distribution method 1 SLAVE

Supports new plan shapes potentially collapsing multiple DFO trees into a single one

Simplifies PX plan generation and avoids odd side effects of having multiple DFO trees

But can lead to more BUFFERED operations

Page 25: Oracle 12c Parallel Execution New Features
Page 26: Oracle 12c Parallel Execution New Features
Page 27: Oracle 12c Parallel Execution New Features

New feature parallel FILTER subquery evaluation

Again simplifies PX plan shape and allows filter subquery evaluation in the Parallel Execution Servers => can reduce runtime

Prevents certain pre-12c plan shapes leading to multiple DFO trees

Not always used, 12c can fall back to old shape

Page 28: Oracle 12c Parallel Execution New Features
Page 29: Oracle 12c Parallel Execution New Features
Page 30: Oracle 12c Parallel Execution New Features

Three important aspects of Parallel Execution

Major 12c Parallel Execution new features

Some more new 12c Parallel Execution features

Conclusion / Q & A

Page 31: Oracle 12c Parallel Execution New Features

New feature replicated parallel full table scan – instead of BROADCAST distribution

Only applicable to parallel full table scans eligible for BROADCAST distribution

Instead of chunked parallel full table scan with distribution afterwards each slave performs the complete full scan directly

Page 32: Oracle 12c Parallel Execution New Features
Page 33: Oracle 12c Parallel Execution New Features
Page 34: Oracle 12c Parallel Execution New Features

New feature EXPRESSION EVALUATION operator

Can be used for scalar subqueries in the projection of parallel plans (but also old shape possible depending on SQL features used and combined)

Good: Plan shape corresponds now to the “rules” how to read with scalar subqueries

Bad: Some odd behaviour at runtime spotted

Page 35: Oracle 12c Parallel Execution New Features
Page 36: Oracle 12c Parallel Execution New Features
Page 37: Oracle 12c Parallel Execution New Features

Many new PX operators and plan shapes introduced with 12c

Biggest change in this area since explicit introduction of PX operators in Oracle 10g

Not as revolutionary as other new features but a good sign that Oracle continues innovation in this area, too

Page 38: Oracle 12c Parallel Execution New Features

Q & A