SlideShare a Scribd company logo
1 of 57
Tuning SQL for Exadata	




                               Karen	
  Morton	
  
                            Sr.	
  Technical	
  Consultant	
  
karen.morton@enkitec.com	
  

karenmorton.blogspot.com	
  


karen_morton	
  




                               2	
  
decode	
  (	
  	
  
substr	
  (	
  <What	
  you	
  hear	
  about	
  Exadata>,	
  t1,	
  t2	
  ),	
  	
  
<Your	
  understanding/beliefs/percepJons>,	
  
<The	
  hype	
  and	
  the	
  myths>	
  )	
  


                                       ≠	
  
                            Exadata	
  reality	
  


                                                                                  3	
  
Tuning	
  for	
  Exadata?	
  

                        Huh?	
  

     Drop	
  all	
  indexes	
  &	
  let	
  'er	
  rip!	
  
Exadata	
  magic	
  will	
  take	
  care	
  of	
  the	
  rest.	
  
                                                                     4	
  
5	
  
Exadata	
  
      is	
  NOT	
  
a	
  magic	
  cure	
  
          for	
  	
  
     bad	
  SQL!	
  
                         6	
  
However,	
  
 fixing	
  bad	
  SQL	
  
may	
  make	
  Exadata	
  
  appear	
  to	
  be	
  
  a	
  magic	
  cure.	
  
                             7	
  
So,	
  what's	
  different	
  
  about	
  tuning	
  SQL	
  
        on	
  Exadata?	
  




                                8	
  
The	
  truth	
  is…	
  
                      not	
  much!	
  




                                         9	
  
1
Gathering	
  execuJon	
  
     plan	
  data	
  

                            10	
  
/*+	
  monitor	
  */	
  
                   vs	
  
/*+	
  gather_plan_staJsJcs	
  */	
  
   (or	
  staJsJcs_level	
  =	
  	
  ALL)	
  



                 Why?	
  

                                                11	
  
12	
  
If	
  use	
  just	
  gather_plan_staJsJcs	
  hint,	
  response	
  Jme	
  was	
  approximately	
  6	
  seconds.	
  
                                                                                                                     13	
  
2
Displaying	
  execuJon	
  
      plan	
  data	
  

                             14	
  
dbms_sqltune.report_sql_monitor	
  
              vs	
  
   dbms_xplan.display_cursor	
  
          'ALLSTATS	
  LAST'	
  



               Why?	
  

                                      15	
  
How	
  to	
  Generate	
  
select DBMS_SQLTUNE.REPORT_SQL_MONITOR(
   sql_id=>'&sql_id',
   session_id=>nvl('&sid',sys_context('userenv','sid')),
   type=>'&report_type',
   report_level=>'ALL') as report
from dual;


select *
from table(DBMS_XPLAN.DISPLAY_CURSOR(
       '&sql_id','&child_no',
       nvl('&format','ALLSTATS LAST')));




            Defaults	
  to	
  last	
  statement	
  executed	
  in	
  the	
  current	
  session	
  
                                                                                                     16	
  
SQL	
  Monitor	
  Report	
  




          TYPE=>TEXT	
  
                               17	
  
TYPE=>HTML	
  
                 18	
  
3
General	
  approach	
  
 to	
  opJmizaJon   	
  
                           19	
  
Index	
  effecJveness	
  
         &	
  throwaway	
  
                 vs	
  
         Smart	
  scans	
  

       Hybrid	
  (OLTP	
  and	
  DW	
  mixed)	
  environments	
  
can	
  make	
  achieving	
  opJmal	
  balance	
  *very*	
  difficult!	
  


                                                                          20	
  
By	
  the	
  way…	
  
                   	
  
the	
  opJmizer	
  doesn't	
  know	
  
  about	
  Exadata	
  features.	
  
                                  …yet	
  


                                             21	
  
22	
  
The	
  Good	
  
•    Smart	
  scans	
  
•    Storage	
  indexes	
  
•    ESFC	
  
•    Parallelism	
  
•    ParJJoning	
  

          Features	
  where	
  you	
  get	
  the	
  most	
  bang	
  for	
  your	
  SQL	
  tuning	
  buck.	
  



                                                                                                                23	
  
Smart	
  Scans	
  
•  Goal	
  is	
  to	
  reduce	
  the	
  amount	
  of	
  data	
  sent	
  
   from	
  storage	
  nodes	
  to	
  database	
  nodes	
  
•  Only	
  happen	
  when	
  
    –  Full	
  scan	
  (either	
  TABLE	
  or	
  INDEX	
  FAST	
  FULL)	
  
    –  Direct	
  path	
  reads	
  
•  Blocks	
  (rows)	
  returned	
  to	
  PGA	
  (not	
  to	
  buffer	
  
   cache)	
  
    –  Results	
  limited	
  via	
  Column	
  ProjecJon,	
  Predicate	
  
       Filtering,	
  Join	
  filters	
  (bloom)	
  
                                                                              24	
  
How	
  do	
  you	
  know?	
  
•  V$SQL	
  family	
  of	
  views:	
  	
  
     –  IO_CELL_OFFLOAD_RETURNED_BYTES	
  
     –  IO_CELL_OFFLOAD_ELIGIBLE_BYTES	
  
•  Wait	
  event	
  (+)	
  
     –  cell	
  smart	
  table	
  scan	
  
     –  cell	
  smart	
  index	
  scan	
  
•  Plan	
  	
  
                                                 Does	
  not	
  necessarily	
  
     –  TABLE	
  ACCESS	
  STORAGE	
  FULL	
      mean	
  a	
  smart	
  scan	
  
                                                 occurred	
  but	
  that	
  it	
  
     –  Storage()	
  predicate	
                          could!	
  
                                                                                     25	
  
Smart	
  Scans	
  




                     26	
  
Storage	
  Indexes	
  
•  Goal	
  is	
  to	
  eliminate	
  disk	
  I/O	
  
•  Built	
  automaJcally	
  (max	
  8	
  columns	
  per	
  table)	
  
•  Store	
  min	
  and	
  max	
  column	
  values	
  
   –  Storage	
  units	
  which	
  cannot	
  contain	
  requested	
  
      rows	
  are	
  skipped	
  
•  Requires	
  
   –  Smart	
  scan	
  
   –  WHERE	
  clause	
  with	
  at	
  least	
  1	
  predicate	
  
   –  Simple	
  comparison	
  operator	
  (=,<,>,etc.)	
  
                                                                        27	
  
How	
  do	
  you	
  know?	
  
Check	
  session	
  stats	
  (v$mystat)	
  for	
  	
  'cell	
  physical	
  
IO	
  bytes	
  saved	
  by	
  storage	
  index'	
  
SQL> select s.name, m.value cell_stats
  2    from v$mystat m, v$statname s
  3    where s.statistic# = m.statistic#
  4    and name like ('%storage%')
  5 /

NAME                                                 CELL_STATS
--------------------------------------------- -----------------
cell physical IO bytes saved by storage index     9,571,704,832

                            CumulaJve	
  for	
  session	
  

                                                                              28	
  
Exadata	
  Smart	
  Flash	
  Cache	
  (ESFC)	
  
•  A	
  disk	
  cache	
  for	
  the	
  storage	
  servers	
  
•  Usage	
  is	
  mostly	
  automaJc	
  
    –  Can	
  pin	
  tables	
  using	
  	
  
       	
  STORAGE (CELL_FLASH_CACHE KEEP)
•  Helps	
  with	
  OLTP	
  workloads	
  
•  Reads	
  from	
  storage	
  servers	
  done	
  with	
  async	
  
   calls	
  to	
  both	
  ESFC	
  and	
  disk	
  
    –  Winner	
  returns	
  data	
  
•  Smart	
  scans	
  may	
  use	
  ESFC	
  if	
  table	
  is	
  pinned	
     29	
  
How	
  do	
  you	
  know?	
  
Check	
  session	
  stats	
  (v$mystat)	
  for	
  	
  'cell	
  flash	
  
cache	
  read	
  hits'	
  
SQL> select s.name, m.value hits
  2    from v$mystat m, v$statname s
  3    where s.statistic# = m.statistic#
  4    and name like ('cell flash%')
  5 /

NAME                                                 HITS
--------------------------------------------- -----------
cell flash cache read hits                      5,424,023




                                                                          30	
  
Of	
  course,	
  there	
  are	
  also	
  big	
  wins	
  
  to	
  be	
  gained	
  with	
  parallelism	
  
              and	
  parJJoning.	
  




                                                           31	
  
What	
  happens	
  when…	
  

  SQL	
         PX?	
     Part?	
      Hints?	
         Offload?	
   LIO	
         Time	
  
Original	
      No	
       No	
           No	
             No	
      2085k	
     6.1	
  min	
  
Original	
      No	
       Yes	
          No	
             Yes	
     1503k	
     27.32	
  sec	
  
Original	
      No	
       Yes	
      Yes	
  (HJ)	
        Yes	
     127k	
      15.76	
  sec	
  
Original	
      Yes	
      Yes	
          No	
             Yes	
     5131	
      13.51	
  sec	
  
Rewrite	
       No	
       No	
           No	
             Yes	
     1428k	
     20.16	
  sec	
  
Rewrite	
       No	
       Yes	
          No	
             Yes	
     125k	
      2.48	
  sec	
  
Rewrite	
       Yes	
      Yes	
          No	
             Yes	
     5225	
      1.75	
  sec	
  




                                                                                                    32	
  
These	
  features	
  are	
  great,	
  
    but	
  how	
  do	
  you	
  ensure	
  
            they	
  kick	
  in?	
  


…you	
  can't	
  guarantee	
  they	
  will	
  

                                                 33	
  
Impacts	
  of	
  RewriJng	
  SQL	
  

 Descrip?on	
                    Before	
          ACer	
          %	
  Savings	
  
 BI	
  Report	
                  1	
  hour	
       65	
  sec	
     98.33%	
  
 Job	
  P	
  -­‐	
  SELECT	
     2	
  hours	
      15	
  sec	
     99.79%	
  
 Job	
  P	
  -­‐	
  INSERT	
     5	
  hours	
      60	
  sec	
     99.67%	
  
 Job	
  P	
  -­‐	
  DELETE	
     1.5	
  hours	
   30	
  sec	
      99.17%	
  




Savings	
  achieved	
  from	
  rewrites	
  
      not	
  from	
  Exadata.	
  
                                                                                      34	
  
35	
  
Unpredictable	
  behavior	
  	
  




                                    36	
  
Did	
  I	
  menJon…	
  
                      	
  
the	
  opJmizer	
  doesn't	
  know	
  
  about	
  Exadata	
  features.	
  



                                         37	
  
Even	
  when	
  smart	
  scans	
  are	
  possible,	
  
         they	
  may	
  not	
  happen.	
  


   Read	
  consistency,	
  delayed	
  block	
  cleanout,	
  
    chained	
  rows	
  can	
  interrupt	
  smart	
  scans.	
  


                                                                 38	
  
In	
  mixed	
  workload	
  environments,	
  
  the	
  opJmizer	
  tends	
  to	
  pick	
  index-­‐
oriented	
  plans	
  over	
  scan-­‐based	
  plans.	
  

    Even	
  though	
  scan-­‐based	
  plans	
  are	
  o6en	
  much	
  faster.	
  




                                                                                    39	
  
Example	
  1	
  –	
  Response	
  Time	
  approximately	
  73	
  minutes	
  




ExecuJon	
  Plan	
  




                                                                              40	
  
Response	
  Time	
  Profile	
  by	
  SubrouJne	
  




                                                    41	
  
Example	
  2	
  –	
  Response	
  Time	
  approximately	
  5	
  minutes	
  
	
  




ExecuJon	
  Plan	
  




                                                                             42	
  
No	
  smart	
  scan	
  


Response	
  Time	
  Profile	
  by	
  SubrouJne	
  




                                                                              43	
  
"Ensuring"	
  Smart	
  Scans	
  
                                                         Must	
  achieve	
  
•  Make	
  indexes	
  invisible	
                      direct	
  path	
  mode	
  

•  Use	
  hints	
  (PARALLEL,	
  FULL,	
  etc)	
  
•  Instance	
  parameters	
  
    –  _serial_direct_read	
  =	
  true/always	
  
    –  _small_table_threshold	
  
    –  opJmizer_index_cost_adj	
  	
  
•  Make	
  sure	
  stats	
  are	
  representaJve	
  


                                                                            44	
  
SomeJmes	
  the	
  problem	
  is	
  due	
  to	
  a	
  
       long-­‐standing,	
  but	
  undetected,	
  issue.	
  
StaJsJcs	
  collecJon	
  using	
  esJmate_percent=>30	
  




StaJsJcs	
  collecJon	
  using	
  esJmate_percent=>dbms_stats.auto_sample_size	
  




                                                                                     45	
  
SomeJmes	
  the	
  results	
  are	
  
                different	
  from	
  what	
  is	
  expected.	
  
Indexing	
  




StaJsJcs	
  (histograms	
  vs	
  no	
  histograms)	
  




                                     ds83vw975h9r0	
   	
  -­‐	
  With	
  histograms	
  
                                     btafdzsbmg99x	
   	
  -­‐	
  No	
  histograms	
                          46	
  
                                     29g25h6xxk2a60	
   	
  -­‐	
  No	
  histograms	
  /	
  No	
  Offload	
  
SomeJmes	
  segregaJng	
  users	
  helps.	
  
•    Create	
  separate	
  "group	
  users"	
  
•    Create	
  LOGON	
  trigger	
  for	
  each	
  group	
  
•    Apply	
  different	
  parameter	
  se}ngs	
  per	
  group	
  
•    Examples:	
  
     –  _b_tree_bitmap_plans	
  =	
  TRUE/FALSE	
  
     –  _opJmizer_use_feedback	
  =	
  TRUE/FALSE	
  
     –  opJmizer_index_cost_adj	
  =	
  >	
  100	
  



                                                                    47	
  
48	
  
Row	
  by	
  row	
  processing	
  
          (is	
  always	
  a	
  bad	
  idea!)	
  




                                                    30	
  us	
  

                                                    100	
  ms	
  




          Exadata	
  can't	
  fix	
  this!	
  
Some	
  "odd"	
  ones	
  
•  Parameter	
  changes	
  
    –  _opJmizer_max_permutaJons	
  =	
  80000	
  
        •  Helped	
  one	
  "class"	
  of	
  SQL	
  
        •  Caused	
  measurably	
  higher	
  CPU	
  usage	
  in	
  parsing	
  
    –  opJmizer_index_cost_adj	
  =	
  10000	
  
        •  Worked	
  when	
  nothing	
  else	
  seemed	
  to	
  be	
  effecJve	
  
    –  _b_tree_bitmap_plans	
  =	
  false	
  
        •  Even	
  dropped	
  all	
  bitmap	
  indexes	
  
•  Delete/lock	
  stats	
  on	
  some	
  tables	
  	
  
    –  Helped	
  OLTP,	
  o~en	
  hurt	
  DW	
                                      50	
  
Some	
  "odd"	
  ones	
  
•  Cardinality	
  feedback	
  
   –  Numerous	
  plans	
  derived	
  
   –  Very	
  high	
  CPU	
  Service	
  for	
  EXEC	
  calls	
  waits	
  
        •  Hard	
  parsing	
  of	
  complex	
  queries	
  with	
  binds	
  where	
  bind	
  
           opJmizaJon	
  deferred	
  unJl	
  EXEC	
  phase	
  
        •  Turn	
  off	
  CF,	
  wait	
  Jmes	
  reduced	
  from	
  20+	
  to	
  1-­‐2	
  secs	
  




                                                                                               51	
  
Frequent	
  use	
  of	
  SQL	
  Profiles	
  
                       as	
  "quick	
  fix"	
  
                                       	
  
•      Change	
  session	
  parameters	
  
•      Use	
  hints	
  
•      Rewrite	
  SQL	
  
•      Take	
  "good"	
  plan	
  from	
  shared	
  pool	
  
•      A•ach	
  to	
  "bad"	
  plan	
  from	
  AWR	
  	
  
•      Set	
  force	
  matching	
  on	
  
Used	
  as	
  stop-­‐gap	
  for	
  immediate	
  problem,	
  but	
  o~en	
  forgo•en	
  and	
  root	
  cause	
  not	
  fixed.	
  
                                                  Can	
  stop	
  working.	
  
                  Force	
  matching	
  doesn't	
  work	
  if	
  both	
  literals	
  and	
  binds	
  present.	
  

                                                                                                                            52	
  
What	
  I	
  want	
  to	
  know	
  




                                      53	
  
Recap	
  
•  There's	
  a	
  great	
  deal	
  of	
  good	
  to	
  be	
  achieved	
  
•  Behavior	
  is	
  frequently	
  unpredicatable	
  
•  Mixed	
  environments	
  can	
  be	
  nightmarish	
  
•  Forcing	
  desired	
  behavior	
  can	
  force	
  "bad"	
  
   pracJces	
  to	
  be	
  used	
  
•  Locking	
  down	
  plans	
  (SQL	
  Profiles)	
  isn't	
  
   necessarily	
  a	
  permanent	
  fix	
  (or	
  shouldn't	
  be)	
  
•  Hope	
  for	
  more	
  help	
  from	
  the	
  opJmizer	
  in	
  the	
  
   future!	
                                                                 54	
  
Remember…	
  

                Exadata	
  
                 is	
  NOT	
  
           a	
  magic	
  cure	
  
                     for	
  	
  
                bad	
  SQL!	
  
                                    55	
  
Fix	
  SQL	
  
(if	
  possible)	
  
 to	
  achieve	
  
best	
  results	
  

                       56	
  
Thank	
  you!	
  




                    57	
  

More Related Content

What's hot

Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsAnil Nair
 
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’ OracleGuatemala User Group
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizerMauro Pagano
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slidesMohamed Farouk
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfSrirakshaSrinivasan2
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the TradeCarlos Sierra
 
Oracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention TroubleshootingOracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention TroubleshootingTanel Poder
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Carlos Sierra
 
Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slidesMohamed Farouk
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Markus Michalewicz
 
Oracle Database SQL Tuning Concept
Oracle Database SQL Tuning ConceptOracle Database SQL Tuning Concept
Oracle Database SQL Tuning ConceptChien Chung Shen
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESLudovico Caldara
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONMarkus Michalewicz
 
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 fundamentalsJohn Beresniewicz
 
New Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21cNew Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21cMarkus Flechtner
 

What's hot (20)

Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret Internals
 
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
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
 
Exadata Backup
Exadata BackupExadata Backup
Exadata Backup
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the Trade
 
Oracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention TroubleshootingOracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention Troubleshooting
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360
 
Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slides
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
 
Oracle Database SQL Tuning Concept
Oracle Database SQL Tuning ConceptOracle Database SQL Tuning Concept
Oracle Database SQL Tuning Concept
 
AWR and ASH Deep Dive
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLON
 
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
 
New Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21cNew Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21c
 

Viewers also liked

Oracle Exadata - Issues and Challenges
Oracle Exadata - Issues and ChallengesOracle Exadata - Issues and Challenges
Oracle Exadata - Issues and Challengescomahony
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)Gustavo Rene Antunez
 
Open world exadata_top_10_lessons_learned
Open world exadata_top_10_lessons_learnedOpen world exadata_top_10_lessons_learned
Open world exadata_top_10_lessons_learnedchet justice
 
Exadata x2 ext
Exadata x2 extExadata x2 ext
Exadata x2 extyangjx
 
Oracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesTanel Poder
 
Otimizando um banco de dados Oracle para Exadata
Otimizando um banco de dados Oracle para ExadataOtimizando um banco de dados Oracle para Exadata
Otimizando um banco de dados Oracle para ExadataRodrigo Almeida
 
Oracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & TricksOracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & TricksJeff Smith
 
Informatica MDM Presentation
Informatica MDM PresentationInformatica MDM Presentation
Informatica MDM PresentationMaxHung
 
Epic Clarity Running on Exadata
Epic Clarity Running on ExadataEpic Clarity Running on Exadata
Epic Clarity Running on ExadataEnkitec
 
Exadata
ExadataExadata
Exadatatalek
 
From oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsFrom oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsGuy Harrison
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Guy Harrison
 

Viewers also liked (12)

Oracle Exadata - Issues and Challenges
Oracle Exadata - Issues and ChallengesOracle Exadata - Issues and Challenges
Oracle Exadata - Issues and Challenges
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)
 
Open world exadata_top_10_lessons_learned
Open world exadata_top_10_lessons_learnedOpen world exadata_top_10_lessons_learned
Open world exadata_top_10_lessons_learned
 
Exadata x2 ext
Exadata x2 extExadata x2 ext
Exadata x2 ext
 
Oracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known Features
 
Otimizando um banco de dados Oracle para Exadata
Otimizando um banco de dados Oracle para ExadataOtimizando um banco de dados Oracle para Exadata
Otimizando um banco de dados Oracle para Exadata
 
Oracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & TricksOracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & Tricks
 
Informatica MDM Presentation
Informatica MDM PresentationInformatica MDM Presentation
Informatica MDM Presentation
 
Epic Clarity Running on Exadata
Epic Clarity Running on ExadataEpic Clarity Running on Exadata
Epic Clarity Running on Exadata
 
Exadata
ExadataExadata
Exadata
 
From oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsFrom oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other tools
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)
 

Similar to Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly

Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionTanel Poder
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneEnkitec
 
Oracle vs. SQL Server- War of the Indices
Oracle vs. SQL Server- War of the IndicesOracle vs. SQL Server- War of the Indices
Oracle vs. SQL Server- War of the IndicesKellyn Pot'Vin-Gorman
 
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...Jim Czuprynski
 
Databse & Technology 2 | Connor McDonald | Managing Optimiser Statistics - A ...
Databse & Technology 2 | Connor McDonald | Managing Optimiser Statistics - A ...Databse & Technology 2 | Connor McDonald | Managing Optimiser Statistics - A ...
Databse & Technology 2 | Connor McDonald | Managing Optimiser Statistics - A ...InSync2011
 
Drilling Deep Into Exadata Performance
Drilling Deep Into Exadata PerformanceDrilling Deep Into Exadata Performance
Drilling Deep Into Exadata PerformanceEnkitec
 
Oracle ebs capacity_analysisusingstatisticalmethods
Oracle ebs capacity_analysisusingstatisticalmethodsOracle ebs capacity_analysisusingstatisticalmethods
Oracle ebs capacity_analysisusingstatisticalmethodsAjith Narayanan
 
MySQL Goes to 8! FOSDEM 2020 Database Track, January 2nd, 2020
MySQL Goes to 8!  FOSDEM 2020 Database Track, January 2nd, 2020MySQL Goes to 8!  FOSDEM 2020 Database Track, January 2nd, 2020
MySQL Goes to 8! FOSDEM 2020 Database Track, January 2nd, 2020Geir Høydalsvik
 
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesMySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesSeveralnines
 
Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)Frazer Clement
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1Navneet Upneja
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
A MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverA MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverKeith Hollman
 
MySQL Without the SQL -- Oh My! Longhorn PHP Conference
MySQL Without the SQL -- Oh My!  Longhorn PHP ConferenceMySQL Without the SQL -- Oh My!  Longhorn PHP Conference
MySQL Without the SQL -- Oh My! Longhorn PHP ConferenceDave Stokes
 
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_questionAjith Narayanan
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replicationorczhou
 

Similar to Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly (20)

Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in Action
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
 
Oracle vs. SQL Server- War of the Indices
Oracle vs. SQL Server- War of the IndicesOracle vs. SQL Server- War of the Indices
Oracle vs. SQL Server- War of the Indices
 
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
 
Databse & Technology 2 | Connor McDonald | Managing Optimiser Statistics - A ...
Databse & Technology 2 | Connor McDonald | Managing Optimiser Statistics - A ...Databse & Technology 2 | Connor McDonald | Managing Optimiser Statistics - A ...
Databse & Technology 2 | Connor McDonald | Managing Optimiser Statistics - A ...
 
Drilling Deep Into Exadata Performance
Drilling Deep Into Exadata PerformanceDrilling Deep Into Exadata Performance
Drilling Deep Into Exadata Performance
 
Oracle ebs capacity_analysisusingstatisticalmethods
Oracle ebs capacity_analysisusingstatisticalmethodsOracle ebs capacity_analysisusingstatisticalmethods
Oracle ebs capacity_analysisusingstatisticalmethods
 
MySQL Goes to 8! FOSDEM 2020 Database Track, January 2nd, 2020
MySQL Goes to 8!  FOSDEM 2020 Database Track, January 2nd, 2020MySQL Goes to 8!  FOSDEM 2020 Database Track, January 2nd, 2020
MySQL Goes to 8! FOSDEM 2020 Database Track, January 2nd, 2020
 
Oracle 12c SPM
Oracle 12c SPMOracle 12c SPM
Oracle 12c SPM
 
Oracle analysis 101_v1.0_ext
Oracle analysis 101_v1.0_extOracle analysis 101_v1.0_ext
Oracle analysis 101_v1.0_ext
 
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesMySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
 
Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1
 
OOW13 Exadata and ODI with Parallel
OOW13 Exadata and ODI with ParallelOOW13 Exadata and ODI with Parallel
OOW13 Exadata and ODI with Parallel
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
A MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverA MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole Crossover
 
MySQL Without the SQL -- Oh My! Longhorn PHP Conference
MySQL Without the SQL -- Oh My!  Longhorn PHP ConferenceMySQL Without the SQL -- Oh My!  Longhorn PHP Conference
MySQL Without the SQL -- Oh My! Longhorn PHP Conference
 
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
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
 

More from Enkitec

Using Angular JS in APEX
Using Angular JS in APEXUsing Angular JS in APEX
Using Angular JS in APEXEnkitec
 
Controlling execution plans 2014
Controlling execution plans   2014Controlling execution plans   2014
Controlling execution plans 2014Enkitec
 
Engineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEngineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEnkitec
 
Think Exa!
Think Exa!Think Exa!
Think Exa!Enkitec
 
In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1Enkitec
 
Mini Session - Using GDB for Profiling
Mini Session - Using GDB for ProfilingMini Session - Using GDB for Profiling
Mini Session - Using GDB for ProfilingEnkitec
 
Profiling Oracle with GDB
Profiling Oracle with GDBProfiling Oracle with GDB
Profiling Oracle with GDBEnkitec
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the TradeEnkitec
 
SQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeSQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeEnkitec
 
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityUsing SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityEnkitec
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceEnkitec
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture PerformanceEnkitec
 
APEX Security Primer
APEX Security PrimerAPEX Security Primer
APEX Security PrimerEnkitec
 
How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?Enkitec
 
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Enkitec
 
Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Enkitec
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writerEnkitec
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014Enkitec
 
Combining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityCombining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityEnkitec
 
Why You May Not Need Offloading
Why You May Not Need OffloadingWhy You May Not Need Offloading
Why You May Not Need OffloadingEnkitec
 

More from Enkitec (20)

Using Angular JS in APEX
Using Angular JS in APEXUsing Angular JS in APEX
Using Angular JS in APEX
 
Controlling execution plans 2014
Controlling execution plans   2014Controlling execution plans   2014
Controlling execution plans 2014
 
Engineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEngineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service Demonstration
 
Think Exa!
Think Exa!Think Exa!
Think Exa!
 
In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1
 
Mini Session - Using GDB for Profiling
Mini Session - Using GDB for ProfilingMini Session - Using GDB for Profiling
Mini Session - Using GDB for Profiling
 
Profiling Oracle with GDB
Profiling Oracle with GDBProfiling Oracle with GDB
Profiling Oracle with GDB
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the Trade
 
SQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeSQL Tuning Tools of the Trade
SQL Tuning Tools of the Trade
 
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityUsing SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture Performance
 
APEX Security Primer
APEX Security PrimerAPEX Security Primer
APEX Security Primer
 
How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?
 
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
 
Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014
 
Combining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityCombining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM Stability
 
Why You May Not Need Offloading
Why You May Not Need OffloadingWhy You May Not Need Offloading
Why You May Not Need Offloading
 

Recently uploaded

3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud DataEric D. Schabell
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInThousandEyes
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kitJamie (Taka) Wang
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...DianaGray10
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updateadam112203
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FESTBillieHyde
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0DanBrown980551
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and businessFrancesco Corti
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch TuesdayIvanti
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveIES VE
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Libraryshyamraj55
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Alkin Tezuysal
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Muhammad Tiham Siddiqui
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 

Recently uploaded (20)

3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kit
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 update
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FEST
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and business
 
SheDev 2024
SheDev 2024SheDev 2024
SheDev 2024
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch Tuesday
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 

Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly

  • 1. Tuning SQL for Exadata Karen  Morton   Sr.  Technical  Consultant  
  • 3. decode  (     substr  (  <What  you  hear  about  Exadata>,  t1,  t2  ),     <Your  understanding/beliefs/percepJons>,   <The  hype  and  the  myths>  )   ≠   Exadata  reality   3  
  • 4. Tuning  for  Exadata?   Huh?   Drop  all  indexes  &  let  'er  rip!   Exadata  magic  will  take  care  of  the  rest.   4  
  • 6. Exadata   is  NOT   a  magic  cure   for     bad  SQL!   6  
  • 7. However,   fixing  bad  SQL   may  make  Exadata   appear  to  be   a  magic  cure.   7  
  • 8. So,  what's  different   about  tuning  SQL   on  Exadata?   8  
  • 9. The  truth  is…   not  much!   9  
  • 10. 1 Gathering  execuJon   plan  data   10  
  • 11. /*+  monitor  */   vs   /*+  gather_plan_staJsJcs  */   (or  staJsJcs_level  =    ALL)   Why?   11  
  • 12. 12  
  • 13. If  use  just  gather_plan_staJsJcs  hint,  response  Jme  was  approximately  6  seconds.   13  
  • 14. 2 Displaying  execuJon   plan  data   14  
  • 15. dbms_sqltune.report_sql_monitor   vs   dbms_xplan.display_cursor   'ALLSTATS  LAST'   Why?   15  
  • 16. How  to  Generate   select DBMS_SQLTUNE.REPORT_SQL_MONITOR( sql_id=>'&sql_id', session_id=>nvl('&sid',sys_context('userenv','sid')), type=>'&report_type', report_level=>'ALL') as report from dual; select * from table(DBMS_XPLAN.DISPLAY_CURSOR( '&sql_id','&child_no', nvl('&format','ALLSTATS LAST'))); Defaults  to  last  statement  executed  in  the  current  session   16  
  • 17. SQL  Monitor  Report   TYPE=>TEXT   17  
  • 18. TYPE=>HTML   18  
  • 19. 3 General  approach   to  opJmizaJon   19  
  • 20. Index  effecJveness   &  throwaway   vs   Smart  scans   Hybrid  (OLTP  and  DW  mixed)  environments   can  make  achieving  opJmal  balance  *very*  difficult!   20  
  • 21. By  the  way…     the  opJmizer  doesn't  know   about  Exadata  features.   …yet   21  
  • 22. 22  
  • 23. The  Good   •  Smart  scans   •  Storage  indexes   •  ESFC   •  Parallelism   •  ParJJoning   Features  where  you  get  the  most  bang  for  your  SQL  tuning  buck.   23  
  • 24. Smart  Scans   •  Goal  is  to  reduce  the  amount  of  data  sent   from  storage  nodes  to  database  nodes   •  Only  happen  when   –  Full  scan  (either  TABLE  or  INDEX  FAST  FULL)   –  Direct  path  reads   •  Blocks  (rows)  returned  to  PGA  (not  to  buffer   cache)   –  Results  limited  via  Column  ProjecJon,  Predicate   Filtering,  Join  filters  (bloom)   24  
  • 25. How  do  you  know?   •  V$SQL  family  of  views:     –  IO_CELL_OFFLOAD_RETURNED_BYTES   –  IO_CELL_OFFLOAD_ELIGIBLE_BYTES   •  Wait  event  (+)   –  cell  smart  table  scan   –  cell  smart  index  scan   •  Plan     Does  not  necessarily   –  TABLE  ACCESS  STORAGE  FULL   mean  a  smart  scan   occurred  but  that  it   –  Storage()  predicate   could!   25  
  • 27. Storage  Indexes   •  Goal  is  to  eliminate  disk  I/O   •  Built  automaJcally  (max  8  columns  per  table)   •  Store  min  and  max  column  values   –  Storage  units  which  cannot  contain  requested   rows  are  skipped   •  Requires   –  Smart  scan   –  WHERE  clause  with  at  least  1  predicate   –  Simple  comparison  operator  (=,<,>,etc.)   27  
  • 28. How  do  you  know?   Check  session  stats  (v$mystat)  for    'cell  physical   IO  bytes  saved  by  storage  index'   SQL> select s.name, m.value cell_stats 2 from v$mystat m, v$statname s 3 where s.statistic# = m.statistic# 4 and name like ('%storage%') 5 / NAME CELL_STATS --------------------------------------------- ----------------- cell physical IO bytes saved by storage index 9,571,704,832 CumulaJve  for  session   28  
  • 29. Exadata  Smart  Flash  Cache  (ESFC)   •  A  disk  cache  for  the  storage  servers   •  Usage  is  mostly  automaJc   –  Can  pin  tables  using      STORAGE (CELL_FLASH_CACHE KEEP) •  Helps  with  OLTP  workloads   •  Reads  from  storage  servers  done  with  async   calls  to  both  ESFC  and  disk   –  Winner  returns  data   •  Smart  scans  may  use  ESFC  if  table  is  pinned   29  
  • 30. How  do  you  know?   Check  session  stats  (v$mystat)  for    'cell  flash   cache  read  hits'   SQL> select s.name, m.value hits 2 from v$mystat m, v$statname s 3 where s.statistic# = m.statistic# 4 and name like ('cell flash%') 5 / NAME HITS --------------------------------------------- ----------- cell flash cache read hits 5,424,023 30  
  • 31. Of  course,  there  are  also  big  wins   to  be  gained  with  parallelism   and  parJJoning.   31  
  • 32. What  happens  when…   SQL   PX?   Part?   Hints?   Offload?   LIO   Time   Original   No   No   No   No   2085k   6.1  min   Original   No   Yes   No   Yes   1503k   27.32  sec   Original   No   Yes   Yes  (HJ)   Yes   127k   15.76  sec   Original   Yes   Yes   No   Yes   5131   13.51  sec   Rewrite   No   No   No   Yes   1428k   20.16  sec   Rewrite   No   Yes   No   Yes   125k   2.48  sec   Rewrite   Yes   Yes   No   Yes   5225   1.75  sec   32  
  • 33. These  features  are  great,   but  how  do  you  ensure   they  kick  in?   …you  can't  guarantee  they  will   33  
  • 34. Impacts  of  RewriJng  SQL   Descrip?on   Before   ACer   %  Savings   BI  Report   1  hour   65  sec   98.33%   Job  P  -­‐  SELECT   2  hours   15  sec   99.79%   Job  P  -­‐  INSERT   5  hours   60  sec   99.67%   Job  P  -­‐  DELETE   1.5  hours   30  sec   99.17%   Savings  achieved  from  rewrites   not  from  Exadata.   34  
  • 35. 35  
  • 37. Did  I  menJon…     the  opJmizer  doesn't  know   about  Exadata  features.   37  
  • 38. Even  when  smart  scans  are  possible,   they  may  not  happen.   Read  consistency,  delayed  block  cleanout,   chained  rows  can  interrupt  smart  scans.   38  
  • 39. In  mixed  workload  environments,   the  opJmizer  tends  to  pick  index-­‐ oriented  plans  over  scan-­‐based  plans.   Even  though  scan-­‐based  plans  are  o6en  much  faster.   39  
  • 40. Example  1  –  Response  Time  approximately  73  minutes   ExecuJon  Plan   40  
  • 41. Response  Time  Profile  by  SubrouJne   41  
  • 42. Example  2  –  Response  Time  approximately  5  minutes     ExecuJon  Plan   42  
  • 43. No  smart  scan   Response  Time  Profile  by  SubrouJne   43  
  • 44. "Ensuring"  Smart  Scans   Must  achieve   •  Make  indexes  invisible   direct  path  mode   •  Use  hints  (PARALLEL,  FULL,  etc)   •  Instance  parameters   –  _serial_direct_read  =  true/always   –  _small_table_threshold   –  opJmizer_index_cost_adj     •  Make  sure  stats  are  representaJve   44  
  • 45. SomeJmes  the  problem  is  due  to  a   long-­‐standing,  but  undetected,  issue.   StaJsJcs  collecJon  using  esJmate_percent=>30   StaJsJcs  collecJon  using  esJmate_percent=>dbms_stats.auto_sample_size   45  
  • 46. SomeJmes  the  results  are   different  from  what  is  expected.   Indexing   StaJsJcs  (histograms  vs  no  histograms)   ds83vw975h9r0    -­‐  With  histograms   btafdzsbmg99x    -­‐  No  histograms   46   29g25h6xxk2a60    -­‐  No  histograms  /  No  Offload  
  • 47. SomeJmes  segregaJng  users  helps.   •  Create  separate  "group  users"   •  Create  LOGON  trigger  for  each  group   •  Apply  different  parameter  se}ngs  per  group   •  Examples:   –  _b_tree_bitmap_plans  =  TRUE/FALSE   –  _opJmizer_use_feedback  =  TRUE/FALSE   –  opJmizer_index_cost_adj  =  >  100   47  
  • 48. 48  
  • 49. Row  by  row  processing   (is  always  a  bad  idea!)   30  us   100  ms   Exadata  can't  fix  this!  
  • 50. Some  "odd"  ones   •  Parameter  changes   –  _opJmizer_max_permutaJons  =  80000   •  Helped  one  "class"  of  SQL   •  Caused  measurably  higher  CPU  usage  in  parsing   –  opJmizer_index_cost_adj  =  10000   •  Worked  when  nothing  else  seemed  to  be  effecJve   –  _b_tree_bitmap_plans  =  false   •  Even  dropped  all  bitmap  indexes   •  Delete/lock  stats  on  some  tables     –  Helped  OLTP,  o~en  hurt  DW   50  
  • 51. Some  "odd"  ones   •  Cardinality  feedback   –  Numerous  plans  derived   –  Very  high  CPU  Service  for  EXEC  calls  waits   •  Hard  parsing  of  complex  queries  with  binds  where  bind   opJmizaJon  deferred  unJl  EXEC  phase   •  Turn  off  CF,  wait  Jmes  reduced  from  20+  to  1-­‐2  secs   51  
  • 52. Frequent  use  of  SQL  Profiles   as  "quick  fix"     •  Change  session  parameters   •  Use  hints   •  Rewrite  SQL   •  Take  "good"  plan  from  shared  pool   •  A•ach  to  "bad"  plan  from  AWR     •  Set  force  matching  on   Used  as  stop-­‐gap  for  immediate  problem,  but  o~en  forgo•en  and  root  cause  not  fixed.   Can  stop  working.   Force  matching  doesn't  work  if  both  literals  and  binds  present.   52  
  • 53. What  I  want  to  know   53  
  • 54. Recap   •  There's  a  great  deal  of  good  to  be  achieved   •  Behavior  is  frequently  unpredicatable   •  Mixed  environments  can  be  nightmarish   •  Forcing  desired  behavior  can  force  "bad"   pracJces  to  be  used   •  Locking  down  plans  (SQL  Profiles)  isn't   necessarily  a  permanent  fix  (or  shouldn't  be)   •  Hope  for  more  help  from  the  opJmizer  in  the   future!   54  
  • 55. Remember…   Exadata   is  NOT   a  magic  cure   for     bad  SQL!   55  
  • 56. Fix  SQL   (if  possible)   to  achieve   best  results   56