What To Expect in Oracle 19c
What To Expect in Oracle 19c
Performance Related
Enhancements
John Mullins
[email protected]
www.themisinc.com
www.themisinc.com/webinars
Presenter
◼ John Mullins
◼ Themis Inc. ([email protected])
◼ 34+ years of Oracle experience
1 - SEL$1 / DUAL@SEL$1
- FULL(EMP)
Hint Usage Reporting
◼ Output Example 4:
…
Hint Report (identified by operation id / Query Block Name /
Object Alias):
Total hints for statement: 1 (E - Syntax error (1))
---------------------------------------------------------------------------
1 - SEL$1
E - USE_NL
Hint Usage Reporting
◼ Output Example 5:
…
Hint Report (identified by operation id / Query Block Name /
Object Alias):
Total hints for statement: 1 (E - Syntax error (1))
---------------------------------------------------------------------------
1 - SEL$1
E - HINT1
Hint Usage Reporting
◼ Output Example 6:
…
Hint Report (identified by operation id / Query Block Name /
Object Alias):
Total hints for statement: 2 (N - Unresolved (2))
---------------------------------------------------------------------------
1 - SEL$1
N - FULL(dept)
N - INDEX(emp emp_deptno_ix)
Real Time Statistics
◼ Automatically gathers real-time statistics during
conventional DML operations.
◼ Reduces the possibility of the optimizer being
misled by stale statistics.
◼ Oracle Database 12c introduced online statistics
gathering for CREATE TABLE AS SELECT
statements (Bulk) and direct-path inserts.
◼ Exadata only. Check for availability on other
licenses.
Real Time Statistics
◼ Real-time statistics augment rather than replace
traditional statistics.
◼ Computes values for the most essential statistics.
◼ Manage and access real-time statistics through
PL/SQL packages, data dictionary views, and
hints.
◼ ALL_TAB_STATISTICS View
◼ NOTES Column -
STATS_ON_CONVENTIONAL_DML value
High Frequency
Statistics Gathering
◼ A task periodically gathers statistics for stale
objects.
◼ The default interval is 15 minutes.
◼ Exadata only. Check for availability on other
licenses.
SQL Execution Plan Comparison
◼ Compare a reference plan with some other
execution plan.
◼ Plan can come from memory, AWR History or a
SQL Tuning Set.
◼ DBMS_XPLAN Package.
◼ COMPARE_PLAN Function.
◼ Report in XML, HTML or Text Format.
SQL Execution Plan Comparison
◼ Usage Example:
◼ SQL Statements are executed.
SELECT
dname
FROM dept
WHERE deptno = 10;
SQL Execution Plan Comparison
◼ Get SQL_IDs of statements to compare.
◼ This can come from various sources.
◼ Explain Plan Output.
◼ Memory, Shared Pool. V$SQL for example.
SQL Execution Plan Comparison
◼ Execute COMPARE_PLANS function.
◼ SQL*Plus Example:
VARIABLE v_rep CLOB
BEGIN
:v_rep := DBMS_XPLAN.COMPARE_PLANS(
reference_plan => cursor_cache_object('4nxuq3ffxd5z8', NULL),
compare_plan_list => plan_object_list(cursor_cache_object('adcc8k75cdsxh', NULL)),
type => 'TEXT',
level => 'TYPICAL',
section => 'ALL');
END;
SQL Execution Plan Comparison
◼ View Results.
◼ SQL*Plus Example: