Winning Performance Challenges
in Oracle Standard Editions
Product Manager for Database Monitoring
October 4th , 2018
Pini Dibask
IOUG
Webinar
2
• Pini Dibask, Product Manager for Database Monitoring, Quest Software
• Oracle ACE
• Oracle Certified Professional DBA (OCP)
• Public Speaker )Oracle OpenWorld, IOUG Collaborate, RMOUG, DOAG, OUGN, AOUG)
• Blogger: OracleDBPro.BlogSpot.com
Pini.Dibask@Quest.com
http://Linkedin.com/in/pinidibask
@pini_dibask
About the Speaker
3
Where Am I From?
 Israel, Tel Aviv
4
Who is Quest Software?
9 0 % o f
F o r t u n e 1 0 0
using our
software
1 , 5 0 0
engineers building
quality products
4 M
c o m m u n i t y
m e m b e r s
sharing best practices
3 , 5 0 0
employees focused
on customers
Quest is a global software provider trusted by
100,000 customers and 6,000 partners in 100
countries.
We help IT organizations spend less time on
administration and more time on innovation.
6 , 0 0 0
partners selling
our software
5
 Toad database development &
management tools
 Foglight & Spotlight
database performance
monitoring solutions
 SharePlex for heterogeneous
database replication
Quest Database Tools
6
Agenda
 Introduction to Oracle database performance tuning
 Common challenges when using standard editions
 Winning performance challenges in standard editions
 Q&A
Introductions01
Confidential8
Introduction to Performance Tuning
Data Dictionary
Initialization
Parameters
ASH
Time-
Based
Analysis
Change
Tracking
SGA
KPIs
Blocking
Locks
Optimizer
Statistics
Historical
Activity
AWR
Statspack
Advisories
Visualization
ADDM
SQL Tuning
Baselines
Latch
Contention
Plan Analysis
Confidential9
Instance
Tuning
Memory
Allocations
I/O
Requirements
CPU Resources
Files
Configurations
Initialization
Parameters
Common Performance Diagnostics Approaches
SQL
Tuning
Optimizer
Statistics
Plan
Analysis
Object
Analysis
Plan
Stability
Initialization
Parameters
Confidential10
Instance Tuning - Common Things to Consider
 Initialization Parameters - (such as STATISTICS_LEVEL)
 Memory structures - ASMM, AMM, min size for buffer pools
 Files configuration - redo logs, undo tablespace
 Hardware configuration - memory, storage characteristics, network
 ASM configuration - disk groups and failure groups
 Connection management - both app level and DB level
Confidential11
 Bad SQLs - using literals instead of bind variables
 Object analysis - Indexes, partitions, materialized views
 Optimizer statistics - last analyzed, dynamic statistics (OPTIMIZER_DYNAMIC_SAMPLING)
 Oracle features which may impact execution plans
• SQL Profiles (10g)
• Adaptive Cursor Sharing (11gR2)
• Cardinality Feedback (11gR2)
• Dynamic Statistics (12cR1)
• Adaptive Plans (12cR1)
 Plan stability - SQL plan management (11gR1)
SQL Tuning - Common Things to Consider
Confidential12
1. Determine the most significant bottleneck – i.e. best tuning opportunities
2. Improve/Fix it
3. Repeat it until performance is good
My Blog Post:
http://oracledbpro.blogspot.com/2015/09/simple-performance-tuning-methodology.html
Simplified Performance Tuning Methodology
Confidential13
Time Based Analysis - Which statements should we address first?
 X Axis - db time (CPU time + Non idle wait events)
 Y Axis - number of executions
Confidential14
Time Based Analysis - Which statements should we address first?
 X Axis - db time (CPU time + Non idle wait events)
 Y Axis - number of executions
Confidential15
OK, we found the problematic statements - what’s next?
 What is the statement doing and why?
• Execution plan + statistics
• Most significant wait-events (DB Time standpoint)
)e.g. “checkpoint not complete”, “db file scattered read”)
Confidential16
How can we find them with enterprise edition & diagnostics pack?
 AWR
 ADDM
 ASH
 ASH Analytics
 SQL Tuning Advisory
Confidential17
How can we find them with enterprise edition & diagnostics pack?
 AWR
 ADDM
 ASH
 ASH Analytics
 SQL Tuning Advisory
Confidential18
How can we find them with enterprise edition & diagnostics pack?
 AWR
 ADDM
 ASH
 ASH Analytics
 SQL Tuning Advisory
Confidential19
How can we find them with enterprise edition & diagnostics pack?
 AWR
 ADDM
 ASH
 ASH Analytics
 SQL Tuning Advisory
Confidential20
How can we find them with enterprise edition & diagnostics pack?
 AWR
 ADDM
 ASH
 ASH Analytics
 SQL Tuning Advisory
Oracle Standard
Editions02
Confidential22
Why Standard Editions?
 Less expensive than enterprise edition (but with less capabilities)
 What’s the main challenge when it comes to performance diagnosis?
• Best performance tuning features are part of Diagnostics & Tuning packs
• Diagnostics & Tuning packs – only available with Enterprise Edition
Confidential23
Which standard editions are available?
 12.1.0.1 and earlier
• Standard Edition – support for RAC
• Standard Edition One – no support for RAC
 12.1.0.2 and above
• Standard Edition 2
For more info:
http://www.oracle.com/us/products/database/oracle-db-se2-brief-2680836.pdf
Confidential24
Performance Tuning Challenges for DBAs
Feature No Diagnostics Pack Diagnostics Pack Diagnostics & Tuning Packs
Statspack   
Dictionary Views *
(most of them…)
 
AWR х  
ASH х  
ASH Analytics х  
ADDM/Compare Period ADDM х  
SQL Tuning Advisor х х 
SQL Access Advisor х х 
Winning Performance
Challenges in Oracle
Standard Editions03
26
So what our options when diagnostics pack not available?
 Statspack - available since Oracle 8i (1998)
 Dictionary Views (below are my favorites…)
• DB statistics – V$SESSTAT, V$SYSSTAT
• SQL statistics – V$SQLAREA, V$SQL
• Execution plan information – V$SQL_PLAN, V$SQL_SHARED_CURSOR
• Object level statistics – V$SEGMENT_STATISTICS
• File level statistics – V$FILESTAT
• Wait events – V$SESSION, V$SESSION_WAIT, V$SYSTEM_EVENT
• Time model statistics – V$SYS_TIME_MODEL, V$SES_TIME_MODEL
27
Statspack
 Oracle 8i and above
 “Poor man’s AWR”
 Text based report - no easy navigation
 Less comprehensive than AWR
28
Monitoring locks via Oracle Dictionary Views Cont’d
SQL> SELECT DECODE (blocking_session, null, null, 'BLOCKED') status,
sid,
lmode,
request,
ctime duration,
USER,
program,
blocking_session,
DECODE (request, 0, NULL, SQL_TEXT) SQL_TEXT
FROM v$lock l
JOIN v$session s USING (sid)
LEFT JOIN v$sqlarea USING (sql_id)
WHERE block = 1 OR request > 0
ORDER BY status
STATUS SID LMODE REQUEST DURATION USER PROGRAM BLOCKING_SESSION SQL_TEXT
----------- ---------- ---------- ---------- ---------- ------- ----------- ---------------------------- ------------------------------------------------
BLOCKED 195 4 5 16581 SALES sqlplus.exe 385 lock table employees in share row exclusive mode
BLOCKED 13 0 3 10129 SALES Toad.exe 385 insert into employees values (1, 'Jason')
385 4 0 16575 SALES sqlplus.exe
Real-Time
Monitoring
29
Using Dictionary Views - Example
30
Execution Plan Analysis – Estimated vs. Actual
 GATHER_PLAN_STATISTICS hint
 DBMS_XPLAN.DISPLAY_CURSOR(FORMAT=>'ALLSTATS LAST')
Example:
31
Execution Plan Analysis – Example
Actual cardinality
almost 10 time
higher than
estimated!
32
What are the challenges with these approaches?
 Statspack
• Text format - less intuitive to navigate compared to AWR html format
• Not as feature-rich as AWR
 Dictionary Views (below are my favorites…)
• Limited history
• Cumulative statistics - since startup
But most importantly… no visualization
What do these three things have in common?
They all provide a clearer perspective -
You can’t fix what you can’t see!
What if you could…
Gain complete visibility into the health
and performance of your cross-
platform database environments
Confidential35
Workload Analysis using OEM ASH Analytics
Only with
Enterprise Edition +
Diagnostics Pack
Confidential36
Foglight for Databases: Cross Platform Visibility
Confidential37
 Foglight for Oracle - the Oracle Diagnostics pack alternative
 Analysis tool-set for deep visibility into database performance
 Supports all editions and configurations
 Remote (“agentless”) collector
 Supports all database editions and configurations
Get Performance Diagnostics Without Spending a Fortune!
38
Baseline visualization in Foglight
No baseline
deviation
Deep-dive Multi-Dimensional workload analysis
The alternative to OEM Active Session History Analytics
Drilldown,
slice, and dice
operations
Comprehensive
set of
dimensions
Investigate Multi-Dimensional wait-events & statistics
41
Quickly identifying Blocking locks issues
42
Quickly identifying Blocking locks issues
43
Quickly identifying Blocking locks issues
44
Quickly identifying Blocking locks issues
45
Quickly identifying Blocking locks issues
Track Changes & Correlate them with your workload
Filter by
Execution Plan
Changes
Correlate
between changes
to the actual
workload
See the SQL
statements which
have new plans
Compare between different Execution Plans
Compare different Instances or Dimensions
Compare different Instances or Dimensions
50
Advisories
51
What our customers say?
52
Additional Resources
Foglight for Oracle Website
https://www.quest.com/products/foglight-for-oracle/
Foglight for Oracle Product Overview Video
https://youtu.be/J9olUZx3YaQ
Questions?
Thank you

Winning performance challenges in oracle standard editions

  • 1.
    Winning Performance Challenges inOracle Standard Editions Product Manager for Database Monitoring October 4th , 2018 Pini Dibask IOUG Webinar
  • 2.
    2 • Pini Dibask,Product Manager for Database Monitoring, Quest Software • Oracle ACE • Oracle Certified Professional DBA (OCP) • Public Speaker )Oracle OpenWorld, IOUG Collaborate, RMOUG, DOAG, OUGN, AOUG) • Blogger: OracleDBPro.BlogSpot.com [email protected] http://Linkedin.com/in/pinidibask @pini_dibask About the Speaker
  • 3.
    3 Where Am IFrom?  Israel, Tel Aviv
  • 4.
    4 Who is QuestSoftware? 9 0 % o f F o r t u n e 1 0 0 using our software 1 , 5 0 0 engineers building quality products 4 M c o m m u n i t y m e m b e r s sharing best practices 3 , 5 0 0 employees focused on customers Quest is a global software provider trusted by 100,000 customers and 6,000 partners in 100 countries. We help IT organizations spend less time on administration and more time on innovation. 6 , 0 0 0 partners selling our software
  • 5.
    5  Toad databasedevelopment & management tools  Foglight & Spotlight database performance monitoring solutions  SharePlex for heterogeneous database replication Quest Database Tools
  • 6.
    6 Agenda  Introduction toOracle database performance tuning  Common challenges when using standard editions  Winning performance challenges in standard editions  Q&A
  • 7.
  • 8.
    Confidential8 Introduction to PerformanceTuning Data Dictionary Initialization Parameters ASH Time- Based Analysis Change Tracking SGA KPIs Blocking Locks Optimizer Statistics Historical Activity AWR Statspack Advisories Visualization ADDM SQL Tuning Baselines Latch Contention Plan Analysis
  • 9.
    Confidential9 Instance Tuning Memory Allocations I/O Requirements CPU Resources Files Configurations Initialization Parameters Common PerformanceDiagnostics Approaches SQL Tuning Optimizer Statistics Plan Analysis Object Analysis Plan Stability Initialization Parameters
  • 10.
    Confidential10 Instance Tuning -Common Things to Consider  Initialization Parameters - (such as STATISTICS_LEVEL)  Memory structures - ASMM, AMM, min size for buffer pools  Files configuration - redo logs, undo tablespace  Hardware configuration - memory, storage characteristics, network  ASM configuration - disk groups and failure groups  Connection management - both app level and DB level
  • 11.
    Confidential11  Bad SQLs- using literals instead of bind variables  Object analysis - Indexes, partitions, materialized views  Optimizer statistics - last analyzed, dynamic statistics (OPTIMIZER_DYNAMIC_SAMPLING)  Oracle features which may impact execution plans • SQL Profiles (10g) • Adaptive Cursor Sharing (11gR2) • Cardinality Feedback (11gR2) • Dynamic Statistics (12cR1) • Adaptive Plans (12cR1)  Plan stability - SQL plan management (11gR1) SQL Tuning - Common Things to Consider
  • 12.
    Confidential12 1. Determine themost significant bottleneck – i.e. best tuning opportunities 2. Improve/Fix it 3. Repeat it until performance is good My Blog Post: http://oracledbpro.blogspot.com/2015/09/simple-performance-tuning-methodology.html Simplified Performance Tuning Methodology
  • 13.
    Confidential13 Time Based Analysis- Which statements should we address first?  X Axis - db time (CPU time + Non idle wait events)  Y Axis - number of executions
  • 14.
    Confidential14 Time Based Analysis- Which statements should we address first?  X Axis - db time (CPU time + Non idle wait events)  Y Axis - number of executions
  • 15.
    Confidential15 OK, we foundthe problematic statements - what’s next?  What is the statement doing and why? • Execution plan + statistics • Most significant wait-events (DB Time standpoint) )e.g. “checkpoint not complete”, “db file scattered read”)
  • 16.
    Confidential16 How can wefind them with enterprise edition & diagnostics pack?  AWR  ADDM  ASH  ASH Analytics  SQL Tuning Advisory
  • 17.
    Confidential17 How can wefind them with enterprise edition & diagnostics pack?  AWR  ADDM  ASH  ASH Analytics  SQL Tuning Advisory
  • 18.
    Confidential18 How can wefind them with enterprise edition & diagnostics pack?  AWR  ADDM  ASH  ASH Analytics  SQL Tuning Advisory
  • 19.
    Confidential19 How can wefind them with enterprise edition & diagnostics pack?  AWR  ADDM  ASH  ASH Analytics  SQL Tuning Advisory
  • 20.
    Confidential20 How can wefind them with enterprise edition & diagnostics pack?  AWR  ADDM  ASH  ASH Analytics  SQL Tuning Advisory
  • 21.
  • 22.
    Confidential22 Why Standard Editions? Less expensive than enterprise edition (but with less capabilities)  What’s the main challenge when it comes to performance diagnosis? • Best performance tuning features are part of Diagnostics & Tuning packs • Diagnostics & Tuning packs – only available with Enterprise Edition
  • 23.
    Confidential23 Which standard editionsare available?  12.1.0.1 and earlier • Standard Edition – support for RAC • Standard Edition One – no support for RAC  12.1.0.2 and above • Standard Edition 2 For more info: http://www.oracle.com/us/products/database/oracle-db-se2-brief-2680836.pdf
  • 24.
    Confidential24 Performance Tuning Challengesfor DBAs Feature No Diagnostics Pack Diagnostics Pack Diagnostics & Tuning Packs Statspack    Dictionary Views * (most of them…)   AWR х   ASH х   ASH Analytics х   ADDM/Compare Period ADDM х   SQL Tuning Advisor х х  SQL Access Advisor х х 
  • 25.
    Winning Performance Challenges inOracle Standard Editions03
  • 26.
    26 So what ouroptions when diagnostics pack not available?  Statspack - available since Oracle 8i (1998)  Dictionary Views (below are my favorites…) • DB statistics – V$SESSTAT, V$SYSSTAT • SQL statistics – V$SQLAREA, V$SQL • Execution plan information – V$SQL_PLAN, V$SQL_SHARED_CURSOR • Object level statistics – V$SEGMENT_STATISTICS • File level statistics – V$FILESTAT • Wait events – V$SESSION, V$SESSION_WAIT, V$SYSTEM_EVENT • Time model statistics – V$SYS_TIME_MODEL, V$SES_TIME_MODEL
  • 27.
    27 Statspack  Oracle 8iand above  “Poor man’s AWR”  Text based report - no easy navigation  Less comprehensive than AWR
  • 28.
    28 Monitoring locks viaOracle Dictionary Views Cont’d SQL> SELECT DECODE (blocking_session, null, null, 'BLOCKED') status, sid, lmode, request, ctime duration, USER, program, blocking_session, DECODE (request, 0, NULL, SQL_TEXT) SQL_TEXT FROM v$lock l JOIN v$session s USING (sid) LEFT JOIN v$sqlarea USING (sql_id) WHERE block = 1 OR request > 0 ORDER BY status STATUS SID LMODE REQUEST DURATION USER PROGRAM BLOCKING_SESSION SQL_TEXT ----------- ---------- ---------- ---------- ---------- ------- ----------- ---------------------------- ------------------------------------------------ BLOCKED 195 4 5 16581 SALES sqlplus.exe 385 lock table employees in share row exclusive mode BLOCKED 13 0 3 10129 SALES Toad.exe 385 insert into employees values (1, 'Jason') 385 4 0 16575 SALES sqlplus.exe Real-Time Monitoring
  • 29.
  • 30.
    30 Execution Plan Analysis– Estimated vs. Actual  GATHER_PLAN_STATISTICS hint  DBMS_XPLAN.DISPLAY_CURSOR(FORMAT=>'ALLSTATS LAST') Example:
  • 31.
    31 Execution Plan Analysis– Example Actual cardinality almost 10 time higher than estimated!
  • 32.
    32 What are thechallenges with these approaches?  Statspack • Text format - less intuitive to navigate compared to AWR html format • Not as feature-rich as AWR  Dictionary Views (below are my favorites…) • Limited history • Cumulative statistics - since startup But most importantly… no visualization
  • 33.
    What do thesethree things have in common?
  • 34.
    They all providea clearer perspective - You can’t fix what you can’t see! What if you could… Gain complete visibility into the health and performance of your cross- platform database environments
  • 35.
    Confidential35 Workload Analysis usingOEM ASH Analytics Only with Enterprise Edition + Diagnostics Pack
  • 36.
    Confidential36 Foglight for Databases:Cross Platform Visibility
  • 37.
    Confidential37  Foglight forOracle - the Oracle Diagnostics pack alternative  Analysis tool-set for deep visibility into database performance  Supports all editions and configurations  Remote (“agentless”) collector  Supports all database editions and configurations Get Performance Diagnostics Without Spending a Fortune!
  • 38.
    38 Baseline visualization inFoglight No baseline deviation
  • 39.
    Deep-dive Multi-Dimensional workloadanalysis The alternative to OEM Active Session History Analytics Drilldown, slice, and dice operations Comprehensive set of dimensions
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
    Track Changes &Correlate them with your workload Filter by Execution Plan Changes Correlate between changes to the actual workload See the SQL statements which have new plans
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
    52 Additional Resources Foglight forOracle Website https://www.quest.com/products/foglight-for-oracle/ Foglight for Oracle Product Overview Video https://youtu.be/J9olUZx3YaQ
  • 53.
  • 54.