<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <generator uri="http://jekyllrb.com" version="3.8.5">Jekyll</generator>
  
  
  <link href="https://me-dba.com/feed.xml" rel="self" type="application/atom+xml" />
  <link href="https://me-dba.com/" rel="alternate" type="text/html" />
  <updated>2023-04-05T07:28:48-05:00</updated>
  <id>https://me-dba.com//</id>

  
    <title type="html">Maris Elsins’ blog</title>
  

  
    <subtitle>notes of an oracle apps dba</subtitle>
  

  

  
  
    <entry>
      
      <title type="html">Achieving Rock-solid Maintenance with Template-based Action Plans</title>
      
      
      <link href="https://me-dba.com/posts/achieving-rock-solid-maintenance-with-template-based-action-plans.html" rel="alternate" type="text/html" title="Achieving Rock-solid Maintenance with Template-based Action Plans" />
      
      <published>2019-02-07T13:05:00-06:00</published>
      <updated>2019-02-07T13:05:00-06:00</updated>
      <id>https://me-dba.com/posts/achieving-rock-solid-maintenance-with-template-based-action-plans</id>
      <content type="html" xml:base="https://me-dba.com/posts/achieving-rock-solid-maintenance-with-template-based-action-plans.html">&lt;p&gt;A while ago, I created and started using a tool that helps advancing the maintenance action plans from one testing iteration to another, and finally - to the maintenance activity in production reliably and without introduction of copy/paste or text replacement mistakes. It’s main idea is to allow creating action plan templates that have placeholders instead of environment-specific values, and a spreadsheet that defines all the different values for these placeholders. The final action plan is created automatically with a single click of a button. Interested in doing the same? Read more &lt;a href=&quot;https://blog.pythian.com/achieving-rock-solid-maintenance-with-template-based-action-plans/&quot;&gt;here on Pythian blog&lt;/a&gt;!&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Maintenance" />
      
        <category term="Tools" />
      

      

      
        <summary type="html">A while ago, I created and started using a tool that helps advancing the maintenance action plans from one testing iteration to another, and finally - to the maintenance activity in production reliably and without introduction of copy/paste or text replacement mistakes. It’s main idea is to allow creating action plan templates that have placeholders instead of environment-specific values, and a spreadsheet that defines all the different values for these placeholders. The final action plan is created automatically with a single click of a button. Interested in doing the same? Read more here on Pythian blog!</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Just a Serverless Blog Experiment!</title>
      
      
      <link href="https://me-dba.com/posts/just-a-serverless-blog-experiment.html" rel="alternate" type="text/html" title="Just a Serverless Blog Experiment!" />
      
      <published>2019-01-10T08:46:52-06:00</published>
      <updated>2019-01-10T08:46:52-06:00</updated>
      <id>https://me-dba.com/posts/just-a-serverless-blog-experiment</id>
      <content type="html" xml:base="https://me-dba.com/posts/just-a-serverless-blog-experiment.html">&lt;p&gt;This is not really a propper blog post. I’m just experimenting with serverless blog ideas on GCP.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;This page is served from GCP App Engine.&lt;/p&gt;

&lt;p&gt;The Code for the blogs are stored in a private Google Source Repository and the conversion to static HTML is done by running jekyll build in a docker container that’s initiated with a Cloud Build trigger on each commit to the master branch of the repository. The trigger also redeploys the application automatically to App Engine.&lt;/p&gt;

&lt;p&gt;If you see this page, it means it worked fine :)&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Offtopic" />
      
        <category term="Cloud" />
      
        <category term="Serverless" />
      

      

      
        <summary type="html">This is not really a propper blog post. I’m just experimenting with serverless blog ideas on GCP.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">The getMOSPatch V2 is Here!!!</title>
      
      
      <link href="https://me-dba.com/posts/the-getmospatch-v2-is-here.html" rel="alternate" type="text/html" title="The getMOSPatch V2 is Here!!!" />
      
      <published>2016-07-08T07:46:52-05:00</published>
      <updated>2016-07-08T07:46:52-05:00</updated>
      <id>https://me-dba.com/posts/the-getmospatch-v2-is-here</id>
      <content type="html" xml:base="https://me-dba.com/posts/the-getmospatch-v2-is-here.html">&lt;p&gt;Just wanted to let you know that I’ve released the 2nd version of getMOSPatch - a tool for downloading Oracle patches directly from My Oracle Support to your server without having to visit the support site. It’s now written in java and thus it’s platform independent!
Read more about it on my &lt;a href=&quot;https://www.pythian.com/blog/getmospatch-v2-is-here/&quot;&gt;Pythian blog post here&lt;/a&gt;, and get it directly from &lt;a href=&quot;https://github.com/MarisElsins/getMOSPatch&quot;&gt;GitHub here&lt;/a&gt;!&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/Screen-Shot-2016-07-04-at-01.32.13.png&quot;&gt;&lt;img alt=&quot;getMOSPatch&quot; src=&quot;/images/Screen-Shot-2016-07-04-at-01.32.13.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;getMOSPatch&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Tools" />
      
        <category term="Maintenance" />
      

      
        <category term="download" />
      
        <category term="getmospatch" />
      
        <category term="patching" />
      

      
        <summary type="html">Just wanted to let you know that I’ve released the 2nd version of getMOSPatch - a tool for downloading Oracle patches directly from My Oracle Support to your server without having to visit the support site. It’s now written in java and thus it’s platform independent! Read more about it on my Pythian blog post here, and get it directly from GitHub here! getMOSPatch</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Simple Script for Real-Time Wait Event Monitoring</title>
      
      
      <link href="https://me-dba.com/posts/simple-script-real-time-wait-event-monitoring.html" rel="alternate" type="text/html" title="Simple Script for Real-Time Wait Event Monitoring" />
      
      <published>2016-04-14T17:52:53-05:00</published>
      <updated>2016-04-14T17:52:53-05:00</updated>
      <id>https://me-dba.com/posts/simple-script-real-time-wait-event-monitoring</id>
      <content type="html" xml:base="https://me-dba.com/posts/simple-script-real-time-wait-event-monitoring.html">&lt;p&gt;What do you do when you’re dealing with an ongoing performance issue and somebody’s watching over your shoulder and asking something like “Hey, has our commits’ response time become any better by now?”. Or, if you’re observing a spike in IO requests that doesn’t last for too long, and you want to see how much worse the response times of &lt;code class=&quot;highlighter-rouge&quot;&gt;db file sequential read&lt;/code&gt; events gets? Writing queries at these moments require time which one doesn’t have, so I’ve written a script that I already use in situations like these&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;As the title suggests, the script is very simple, it relies on &lt;code class=&quot;highlighter-rouge&quot;&gt;SQL*Plus&lt;/code&gt; variables to preserve the retrieved values and uses them to calculate deltas when the query is executed again.&lt;/p&gt;

&lt;p&gt;The latest version of the script will always be here: &lt;a href=&quot;https://raw.githubusercontent.com/MarisElsins/TOOLS/master/SQL/DB/rt_wait_perf.sql&quot;&gt;rt_wait_perf.sql&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The script contains a single SQL statement and nothing else:&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lines&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ver&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;off&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;feed&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;off&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v_tst&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;''&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v_wts&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'0'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v_twm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'0'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v_event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'&amp;amp;1'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TIME_WAITED_MICRO&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a15&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_value&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v_twm&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TOTAL_WAITS&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a15&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_value&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v_wts&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TSTAMP&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a26&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_value&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v_tst&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D_WTS&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9999999999999&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D_TWM&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9999999999999&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D_AVG_MS_WT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;999999999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;999&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;INTERVAL_SECS&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;999999999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;999&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EVENT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a40&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;to_char&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;systimestamp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'DD.MM.YYYY HH24:MI:SSXFF'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TSTAMP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
       &lt;span class=&quot;n&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sysdate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;86400&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;systimestamp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_timestamp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'&amp;amp;&amp;amp;v_tst'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'DD.MM.YYYY HH24:MI:SSXFF'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sysdate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;interval_secs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
       &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
       &lt;span class=&quot;n&quot;&gt;to_char&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TOTAL_WAITS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TOTAL_WAITS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
       &lt;span class=&quot;n&quot;&gt;to_char&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TIME_WAITED_MICRO&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TIME_WAITED_MICRO&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
       &lt;span class=&quot;n&quot;&gt;TOTAL_WAITS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v_wts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D_WTS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
       &lt;span class=&quot;n&quot;&gt;TIME_WAITED_MICRO&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v_twm&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D_TWM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
       &lt;span class=&quot;n&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TIME_WAITED_MICRO&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v_twm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;decode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TOTAL_WAITS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v_wts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TOTAL_WAITS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v_wts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;D_AVG_MS_WT&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;system_event&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'&amp;amp;&amp;amp;v_event'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here’s how you use it:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;It requires one argument - the name of the wait event that you want to monitor, i.e &lt;code class=&quot;highlighter-rouge&quot;&gt;SQL&amp;gt; @rt_wait_perf.sql &quot;log file sync&quot;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Simply execute the SQL statement again (by using &lt;code class=&quot;highlighter-rouge&quot;&gt;/&lt;/code&gt;) to get the delta values and milliseconds/wait since the previous execution of the SQL&lt;/li&gt;
  &lt;li&gt;Keep in mind it shows the info for the current instance only (it queries from &lt;code class=&quot;highlighter-rouge&quot;&gt;v$system_event&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;Most of the times you’ll be interested in outputs for “D_WTS” and “D_AVG_MS_WT” columns to see how many times the wait occurred and how long they were during the reference interval.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is how it works:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;SQL&amp;gt; @rt_wait_perf &quot;log file sync&quot;

TSTAMP                      INTERVAL_SECS EVENT           TOTAL_WAITS     TIME_WAITED_MIC       D_WTS         D_TWM D_AVG_MS_WT
-------------------------- -------------- --------------- --------------- --------------- ----------- ------------- -----------
14.04.2016 18:07:25.055984                log file sync   137478504       1096070215896     137478504 1096070215896       7.973
SQL&amp;gt; /

TSTAMP                      INTERVAL_SECS EVENT           TOTAL_WAITS     TIME_WAITED_MIC       D_WTS         D_TWM D_AVG_MS_WT
-------------------------- -------------- --------------- --------------- --------------- ----------- ------------- -----------
14.04.2016 18:07:45.189085         20.133 log file sync   137478672       1096070457766           168        241870       1.440
SQL&amp;gt; /

TSTAMP                      INTERVAL_SECS EVENT           TOTAL_WAITS     TIME_WAITED_MIC       D_WTS         D_TWM D_AVG_MS_WT
-------------------------- -------------- --------------- --------------- --------------- ----------- ------------- -----------
14.04.2016 18:08:00.585761         15.397 log file sync   137478819       1096070666101           147        208335       1.417
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Columns reference:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;TSTAMP - current timestamp&lt;/li&gt;
  &lt;li&gt;INTERVAL_SECS - elapsed time in seconds since previous execution. This is the wall clock time interval between the “snapshots” used to calculate the deltas&lt;/li&gt;
  &lt;li&gt;EVENT - name of the wait event&lt;/li&gt;
  &lt;li&gt;TOTAL_WAITS - total number of waits&lt;/li&gt;
  &lt;li&gt;TIME_WAITED_MIC - total time spent on the wait event in microseconds&lt;/li&gt;
  &lt;li&gt;D_WTS - delta number of waits (since the previous execution)&lt;/li&gt;
  &lt;li&gt;D_TWM - delta time spent on the wait event in microseconds (since the previous execution)&lt;/li&gt;
  &lt;li&gt;D_AVG_MS_WT - average milliseconds per wait event (since the previous execution)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Performance" />
      
        <category term="Monitoring" />
      
        <category term="Tools" />
      

      
        <category term="wait event" />
      

      
        <summary type="html">What do you do when you’re dealing with an ongoing performance issue and somebody’s watching over your shoulder and asking something like “Hey, has our commits’ response time become any better by now?”. Or, if you’re observing a spike in IO requests that doesn’t last for too long, and you want to see how much worse the response times of db file sequential read events gets? Writing queries at these moments require time which one doesn’t have, so I’ve written a script that I already use in situations like these</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Internals of Querying the Concurrent Requests Queue - Revisited for R12.2</title>
      
      
      <link href="https://me-dba.com/posts/internals-of-querying-the-concurrent-requests-queue-revisited-for-r122.html" rel="alternate" type="text/html" title="Internals of Querying the Concurrent Requests Queue - Revisited for R12.2" />
      
      <published>2016-04-11T19:36:00-05:00</published>
      <updated>2016-04-11T19:36:00-05:00</updated>
      <id>https://me-dba.com/posts/internals-of-querying-the-concurrent-requests-queue-revisited-for-r122</id>
      <content type="html" xml:base="https://me-dba.com/posts/internals-of-querying-the-concurrent-requests-queue-revisited-for-r122.html">&lt;p&gt;Once upon a time I wrote about &lt;a href=&quot;http://0.0.0.0:4000/2013/03/the-internal-workflow-of-e-business-suite-concurrent-manager-process.html&quot;&gt;the Internal Workflow of an E-Business Suite Concurrent Manager Process&lt;/a&gt;. Many things have changed since that blog post, from which the most obvious change was the release of Oracle e-Business Suite R12.2. So, I decided to check if the way how the concurrent manager queues were processed by concurrent manager processes were still the same.  My main goal was to see if the manager processes still don’t attempt any way of coordination to distribute the requests among them. &lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;This is how I did the testing:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;I used the VM templates &lt;a href=&quot;https://blogs.oracle.com/stevenChan/entry/e_business_suite_12_2&quot;&gt;provided by Oracle&lt;/a&gt; to build my R12.2.4 test environment. &lt;em&gt;By the way, I didn’t expect that the process of getting the environment up would be so simple! Downloading the media files from (edelivery.oracle.com) was the most time-consuming step, once done - it took me just 1 hour to un-compress everything, import the Virtual Assembly file and bring up the R12.2.4 environment on my laptop.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;3 Standard managers are defined by default&lt;/li&gt;
  &lt;li&gt;“Sleep seconds” were left as is = 30 seconds&lt;/li&gt;
  &lt;li&gt;“Cache size” was increased from 1 to 5.&lt;/li&gt;
  &lt;li&gt;Identified the 3 DB processes that belong to the Standard managers: &lt;code class=&quot;highlighter-rouge&quot;&gt;select sid, serial# from v$session where module='e:FND:cp:STANDARD';&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;I enabled tracing with binds and waits for each of them like this: &lt;code class=&quot;highlighter-rouge&quot;&gt;exec dbms_monitor.session_trace_enable(sid,serial#,true,true);&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Once that was done I submitted one concurrent program - “Active users” and waited for it to complete.&lt;/li&gt;
  &lt;li&gt;I disabled the tracing like this: &lt;code class=&quot;highlighter-rouge&quot;&gt;exec dbms_monitor.session_trace_disable(sid,serial#);&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Collected the trace files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I found 2 of the trace files to be very interesting. To make things more simple, the manager process “A” will be the one that executed the concurrent request, and process “B” will be the one that didn’t.&lt;/p&gt;

&lt;h3 id=&quot;before-the-active-users-request-was-submitted&quot;&gt;Before the “Active Users” request was submitted&lt;/h3&gt;

&lt;p&gt;No other requests were running at the time I did the testing, so I clearly observed how both Managers A and B queried the FND_CONCURRENT_REQUESTS table BOTH of the trace files displayed the same method of how requests are picked up from the queue. &lt;em&gt;Note, I’m showing only the lines relevant to display the main query only, and I have formatted the query text to make it more readable&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PARSING IN CURSOR #139643743645920 len=1149 dep=0 uid=100 oct=3 lid=100 tim=1460211399835915 hv=3722997734 ad='d275f750' sqlid='cd23u4zfyhvz6'
SELECT R.Rowid
FROM Fnd_Concurrent_Requests R
WHERE R.Hold_Flag                             = 'N'
AND R.Status_Code                             = 'I'
AND R.Requested_Start_Date                   &amp;lt;= Sysdate
AND (R.Node_Name1                            IS NULL
OR (R.Node_Name1                             IS NOT NULL
AND FND_DCP.target_node_mgr_chk(R.request_id) = 1))
AND (R.Edition_Name                          IS NULL
OR R.Edition_Name                            &amp;lt;= sys_context('userenv', 'current_edition_name'))
AND EXISTS
  (SELECT NULL
  FROM Fnd_Concurrent_Programs P
  WHERE P.Enabled_Flag         = 'Y'
  AND R.Program_Application_Id = P.Application_Id
  AND R.Concurrent_Program_Id  = P.Concurrent_Program_Id
  AND EXISTS
    (SELECT NULL
    FROM Fnd_Oracle_Userid O
    WHERE R.Oracle_Id = O.Oracle_Id
    AND EXISTS
      (SELECT NULL
      FROM Fnd_Conflicts_Domain C
      WHERE P.Run_Alone_Flag = C.RunAlone_Flag
      AND R.CD_Id            = C.CD_Id
      )
    )
  AND (P.Execution_Method_Code                          != 'S'
  OR (R.PROGRAM_APPLICATION_ID,R.CONCURRENT_PROGRAM_ID) IN ((0,98),(0,100),(0,31721),(0,31722),(0,31757)))
  )
AND ((R.PROGRAM_APPLICATION_ID,R.CONCURRENT_PROGRAM_ID) NOT IN ((510,40032),(510,40033),(510,42156),(510,42157),(530,43793),(530,43794),(535,42626),(535,42627),(535,42628)))
ORDER BY NVL(R.priority, 999999999),
  R.Priority_Request_ID,
  R.Request_ID
END OF STMT
EXEC #139643743645920:c=0,e=33,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=3984653669,tim=1460211399835910
FETCH #139643743645920:c=0,e=546,p=0,cr=106,cu=0,mis=0,r=0,dep=0,og=1,plh=3984653669,tim=1460211399836507
WAIT #139643743645920: nam='SQL*Net message to client' ela= 3 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=1460211399836572

*** 2016-04-09 10:17:09.837
WAIT #139643743645920: nam='SQL*Net message from client' ela= 30000367 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=1460211429836965
...
EXEC #139643743645920:c=0,e=59,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=3984653669,tim=1460211429838767
FETCH #139643743645920:c=0,e=689,p=0,cr=106,cu=0,mis=0,r=0,dep=0,og=1,plh=3984653669,tim=1460211429839587
WAIT #139643743645920: nam='SQL*Net message to client' ela= 4 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=1460211429839652

*** 2016-04-09 10:17:39.840
WAIT #139643743645920: nam='SQL*Net message from client' ela= 30000325 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=1460211459840003
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It’s important to observe that:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;All manager’s processes still compete for the same requests. If the query is executed at the same time - the same list of concurrent requests will be retrieved by all processes.&lt;/li&gt;
  &lt;li&gt;The constants literals used in lines 30-32 mean that the query for checking the queue is still built when the concurrent manager process starts up. These constants are mainly used to implement the specializations rules in the query.&lt;/li&gt;
  &lt;li&gt;Only rowid for the pending requests’ rows in FND_CONCURRENT_REQUESTS are fetched.&lt;/li&gt;
  &lt;li&gt;The sleep time is clearly visible on lines 41,42 and 48,50&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;after-the-active-users-request-was-submitted---starting-the-concurrent-request&quot;&gt;After the “Active Users” request was submitted - Starting the concurrent request.&lt;/h3&gt;

&lt;p&gt;The manager process A was the first to pick up the submitted requests and it could be observed by the &lt;code class=&quot;highlighter-rouge&quot;&gt;r=1&lt;/code&gt; (1 row fetched) in the FETCH call for the query we just reviewed: &lt;code class=&quot;highlighter-rouge&quot;&gt;FETCH #139643743645920:c=0,e=437,p=0,cr=113,cu=0,mis=0,r=1,dep=0,og=1,plh=3984653669,tim=1460211519844640&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Immediately after that, the manager process A locked the row in FND_CONCURRENT_REQUESTS table, this way, the request got assigned to this process. Notice the similar where predicates used in this query, these are actually required to make sure that the request is still not picked up by another manager process. However the main thing here is the fact that the request row is accessed by the &lt;code class=&quot;highlighter-rouge&quot;&gt;rowid&lt;/code&gt; retrieved earlier (row 45, the value of the bind variable &lt;code class=&quot;highlighter-rouge&quot;&gt;:reqname&lt;/code&gt; is &lt;code class=&quot;highlighter-rouge&quot;&gt;AAAjnSAA/AAAyn1AAH&lt;/code&gt; in this case). Locking of the row is done by the &lt;code class=&quot;highlighter-rouge&quot;&gt;FOR UPDATE OF R.status_code NoWait&lt;/code&gt; clause on line 49&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;PARSING&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;IN&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;CURSOR&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;139643743640368&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4530&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dep&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uid&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;oct&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lid&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1460211519864113&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hv&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4239777398&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ad&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'cde86338'&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqlid&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'6ya6bzgybbrmq'&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Conc_Login_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Request_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;excluded&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;other&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;156&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;columns&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;brevity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fnd_concurrent_requests&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;fnd_concurrent_programs&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;fnd_application&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;fnd_user&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;U&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;fnd_oracle_userid&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;fnd_conflicts_domain&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;fnd_concurrent_queues&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;fnd_application&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;fnd_executables&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;fnd_conc_request_arguments&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;X&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Status_code&lt;/span&gt;             &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'I'&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Edition_Name&lt;/span&gt;            &lt;span class=&quot;k&quot;&gt;IS&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;NULL&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Edition_Name&lt;/span&gt;              &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys_context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'userenv'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'current_edition_name'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Request_ID&lt;/span&gt;                &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;X&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Request_ID&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Program_Application_Id&lt;/span&gt;    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Application_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Concurrent_Program_Id&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Concurrent_Program_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Program_Application_Id&lt;/span&gt;    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Application_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Executable_Application_Id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Application_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Executable_Id&lt;/span&gt;             &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Executable_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Executable_Application_Id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Application_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Requested_By&lt;/span&gt;              &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;U&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;User_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Cd_Id&lt;/span&gt;                     &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Cd_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Oracle_Id&lt;/span&gt;                 &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Oracle_Id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Application_Id&lt;/span&gt;            &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;q_applid&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Concurrent_Queue_Id&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;queue_id&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Enabled_Flag&lt;/span&gt;            &lt;span class=&quot;k&quot;&gt;IS&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;NULL&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Enabled_Flag&lt;/span&gt;               &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'Y'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Hold_Flag&lt;/span&gt;                 &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'N'&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Requested_Start_Date&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Sysdate&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Enforce_Seriality_Flag&lt;/span&gt;  &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'N'&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RunAlone_Flag&lt;/span&gt;            &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Run_Alone_Flag&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Run_Alone_Flag&lt;/span&gt;           &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'N'&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;EXISTS&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;NULL&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Fnd_Concurrent_Requests&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Sr&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Sr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Status_Code&lt;/span&gt;         &lt;span class=&quot;k&quot;&gt;IN&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'R'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'T'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Sr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Enforce_Seriality_Flag&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'Y'&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Sr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CD_id&lt;/span&gt;                  &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CD_Id&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Running_Processes&lt;/span&gt;                                     &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Max_Processes&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Rowid&lt;/span&gt;                                                  &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reqname&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Execution_Method_Code&lt;/span&gt;                               &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'S'&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PROGRAM_APPLICATION_ID&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CONCURRENT_PROGRAM_ID&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;       &lt;span class=&quot;k&quot;&gt;IN&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;98&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;31721&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;31722&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;31757&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PROGRAM_APPLICATION_ID&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CONCURRENT_PROGRAM_ID&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;IN&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;510&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;40032&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;510&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;40033&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;510&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42156&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;510&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42157&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;530&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;43793&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;530&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;43794&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;535&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42626&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;535&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42627&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;535&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42628&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;FOR&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPDATE&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;OF&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status_code&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;NoWait&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The behavior of the manager process B was a little bit more interesting. It too managed to fetch the same rowid from FND_CONCURRENT_PROCESSES table belonging to the submitted “Active Users” processes. However, when it tried to lock the row in FND_CONCURRENT_REQUESTS (By using exactly the same query), this happened:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PARSING IN CURSOR #139690311998256 len=4530 dep=0 uid=100 oct=3 lid=100 tim=1460211519900924 hv=4239777398 ad='cde86338' sqlid='6ya6bzgybbrmq'
...
BINDS #139690311998256:
...
Bind#2
  oacdty=01 mxl=32(18) mxlc=00 mal=00 scl=00 pre=00
  oacflg=20 fl2=1000001 frm=01 csi=873 siz=0 off=64
  kxsbbbfp=7f0c2f713f20  bln=32  avl=18  flg=01
  value='AAAjnSAA/AAAyn1AAH'
EXEC #139690311998256:c=1000,e=1525,p=0,cr=25,cu=1,mis=0,r=0,dep=0,og=1,plh=4044729389,tim=1460211519902727
ERROR #139690311998256:err=54 tim=1460211519902750
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The query failed with &lt;code class=&quot;highlighter-rouge&quot;&gt;ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired&lt;/code&gt;.
This is how the access to pending concurrent requests is serialized to make sure only one of the manager processes can run it. And, I think, relying on the well-tuned and highly efficient locking mechanism of Oracle Database is a very very smart idea.&lt;/p&gt;

&lt;h3 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;the coordination between manager processes is still not happening to distribute the requests, but the managers all query the queue the same way and then compete between themselves to lock the requests’ entries on the table 1st. The process that gets the lock also gets to execute the concurrent request.&lt;/li&gt;
  &lt;li&gt;The cache size variable couldn’t be observed in the trace files, but as far as I remember from my previous research the process would only fetch “cache size”-number of rowids using the 1st query in this post. This could be tested by submitting larger volume of requests simultaneously.&lt;/li&gt;
  &lt;li&gt;The “sleep seconds” kicks in only when the manager process didn’t fetch any rowids from the queue. After all the cached requests are attempted/executed by the manager process, the queue is checked again immediately without waiting for the “sleep seconds” (&lt;em&gt;Not explained in detail in this post, but it’s revealed in the trace files&lt;/em&gt;)&lt;/li&gt;
  &lt;li&gt;The DMLs used to query the FND_CONCURRENT_REQUESTS and to lock the row are very very similar to Pre-R12.2 releases of e-Business Suite (Another sign that the process hasn’t changed). (One change that I see is the addition of where clause predicates for Checking the Editions)&lt;/li&gt;
&lt;/ul&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle e-Business Suite" />
      
        <category term="Concurrent Processing" />
      
        <category term="Internals" />
      

      
        <category term="cache size" />
      
        <category term="sleep seconds" />
      

      
        <summary type="html">Once upon a time I wrote about the Internal Workflow of an E-Business Suite Concurrent Manager Process. Many things have changed since that blog post, from which the most obvious change was the release of Oracle e-Business Suite R12.2. So, I decided to check if the way how the concurrent manager queues were processed by concurrent manager processes were still the same. My main goal was to see if the manager processes still don’t attempt any way of coordination to distribute the requests among them.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">SQL Profiles vs. SQL Plan Baselines</title>
      
      
      <link href="https://me-dba.com/posts/sql-profiles-vs-sql-plan-baselines.html" rel="alternate" type="text/html" title="SQL Profiles vs. SQL Plan Baselines" />
      
      <published>2016-03-24T20:26:56-05:00</published>
      <updated>2016-03-24T20:26:56-05:00</updated>
      <id>https://me-dba.com/posts/sql-profiles-vs-sql-plan-baselines</id>
      <content type="html" xml:base="https://me-dba.com/posts/sql-profiles-vs-sql-plan-baselines.html">&lt;p&gt;Recently one of my customers asked, what would happen if we had SQL Profile set up for a particular query to make sure it uses the correct execution plan, as well as an existing SQL Plan Baseline for the same query? What would happen if these two features would like the SQL statement to use different execution plans? Which one would win? I hesitated to answer immediately, although the answer seams obvious now. Look how I came to the answer!&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;I decided to build a quick test case in my 12.1.0.2 lab. The plan is to observe how the preferred execution plan changes after each of these steps:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Create query that uses full table access to query some table, create SQL Plan Baseline for it&lt;/li&gt;
  &lt;li&gt;Create an index on the table so that it allowed more efficient access to the data&lt;/li&gt;
  &lt;li&gt;Observe the new baseline for indexed access being created, evolve it to get it accepted&lt;/li&gt;
  &lt;li&gt;Create SQL Profile to make the full table access favored&lt;/li&gt;
  &lt;li&gt;Remove the SQL Plan Baseline that allows the full table access&lt;/li&gt;
  &lt;li&gt;Remove the SQL Plan Baseline for the indexed access&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;the-test&quot;&gt;The Test&lt;/h3&gt;

&lt;p&gt;This is the table I’m building the test case on:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
SQL&amp;gt; desc all_ash
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 DAT                                                DATE
 MODULE                                             VARCHAR2(64)
 PROGRAM                                            VARCHAR2(64)
 ACTION                                             VARCHAR2(64)
 EVENT                                              VARCHAR2(64)
 MACHINE                                            VARCHAR2(64)
 CNT                                                NUMBER
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And here’s a very simple query that I’ll be using!&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;SQL&amp;gt; select count(*) from all_ash where module='TEST';

  COUNT(*)
----------
         0

SQL&amp;gt; explain plan for select count(*) from all_ash where module='TEST'

Explained.

SQL&amp;gt; select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------
Plan hash value: 3460552988

------------------------------------------------------------------------------
| Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |         |     1 |    17 |   189   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE    |         |     1 |    17 |            |          |
|*  2 |   TABLE ACCESS FULL| ALL_ASH |     1 |    17 |   189   (0)| 00:00:01 |
------------------------------------------------------------------------------

Predicate Information (identified by operation id):

   2 - filter('MODULE'='TEST')
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Creating the SQL Plan Baseline for the query using the Full Table Scan. I’ll load the Plan in to the SQL Management Base from the cursor cache and then will verify if the baseline is there:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
SQL&amp;gt; select sql_id, sql_text, plan_hash_value from v$sql where plan_hash_value=3460552988 and sql_text like 'select%';

SQL_ID
-------------
SQL_TEXT
--------------------------------------------------------------------------------
PLAN_HASH_VALUE
---------------
9kt35fkxmk1qw
select count(*) from all_ash where module='TEST'
     3460552988


SQL&amp;gt; var n number
SQL&amp;gt; exec :n:=DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE('9kt35fkxmk1qw',3460552988);

PL/SQL procedure successfully completed.

SQL&amp;gt; print n

         N
----------
         1

SQL&amp;gt; explain plan for select count(*) from all_ash where module='TEST';

Explained.

SQL&amp;gt; select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------
Plan hash value: 3460552988

------------------------------------------------------------------------------
| Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |         |     1 |    17 |   189   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE    |         |     1 |    17 |            |          |
|*  2 |   TABLE ACCESS FULL| ALL_ASH |     1 |    17 |   189   (0)| 00:00:01 |
------------------------------------------------------------------------------

Predicate Information (identified by operation id):

   2 - filter('MODULE'='TEST')

Note
-----
   - SQL plan baseline 'SQL_PLAN_6bnp3kg5khwxa275ca563' used for this statement
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The SQL Plan Baseline &lt;code class=&quot;highlighter-rouge&quot;&gt;SQL_PLAN_6bnp3kg5khwxa275ca563&lt;/code&gt; is now in place for the plan using &lt;code class=&quot;highlighter-rouge&quot;&gt;TABLE ACCESS FULL&lt;/code&gt;. Let’s create the index, after which we’ll verify it’s not used immediately (because we have the SQL Plan Baseline), but then we’ll evolve the Baseline to start using the index&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;SQL&amp;gt; create index ix_all_ash_mod on all_ash(module);

&lt;span class=&quot;gh&quot;&gt;Index created.
&lt;/span&gt;
SQL&amp;gt; explain plan for select count(*) from all_ash where module='TEST';

Explained.

SQL&amp;gt; select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
&lt;span class=&quot;gd&quot;&gt;-----------------------------------------------------------------------------------------------------------------------------------
&lt;/span&gt;Plan hash value: 3460552988

&lt;span class=&quot;gd&quot;&gt;------------------------------------------------------------------------------
&lt;/span&gt;| Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
&lt;span class=&quot;gd&quot;&gt;------------------------------------------------------------------------------
&lt;/span&gt;|   0 | SELECT STATEMENT   |         |     1 |    17 |   189   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE    |         |     1 |    17 |            |          |
|*  2 |   TABLE ACCESS FULL| ALL_ASH |     1 |    17 |   189   (0)| 00:00:01 |
&lt;span class=&quot;gd&quot;&gt;------------------------------------------------------------------------------
&lt;/span&gt;
Predicate Information (identified by operation id):

PLAN_TABLE_OUTPUT
&lt;span class=&quot;gd&quot;&gt;-----------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------
&lt;/span&gt;
   2 - filter('MODULE'='TEST')

Note
&lt;span class=&quot;gd&quot;&gt;-----
&lt;/span&gt;   - SQL plan baseline 'SQL_PLAN_6bnp3kg5khwxa275ca563' used for this statement

18 rows selected.

SQL&amp;gt; select count(*) from all_ash where module='TEST';

  COUNT(*)
&lt;span class=&quot;gd&quot;&gt;----------
&lt;/span&gt;         0

SQL&amp;gt; select sql_handle from dba_sql_plan_baselines where plan_name='SQL_PLAN_6bnp3kg5khwxa275ca563';

SQL_HANDLE
&lt;span class=&quot;gd&quot;&gt;--------------------------------------------------------------------------------------------------------------------------------
&lt;/span&gt;SQL_65d2a393cb2873aa

1 rows selected.

SQL&amp;gt; col r for a200
SQL&amp;gt; set lines 200
SQL&amp;gt; set pages 50000
SQL&amp;gt; set long 999999
SQL&amp;gt; var r clob
SQL&amp;gt; exec :r:=DBMS_SPM.evolve_sql_plan_baseline(sql_handle =&amp;gt; 'SQL_65d2a393cb2873aa');

PL/SQL procedure successfully completed.

SQL&amp;gt; print r

R
&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------------------------------------------------
&lt;/span&gt;GENERAL INFORMATION SECTION
&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------------------------------------------------
&lt;/span&gt;
 Task Information:
 ---------------------------------------------
 Task Name            : TASK_83
 Task Owner           : C##MARIS
 Execution Name       : EXEC_115
 Execution Type       : SPM EVOLVE
 Scope                : COMPREHENSIVE
 Status               : COMPLETED
 Started              : 03/23/2016 07:50:34
 Finished             : 03/23/2016 07:50:35
 Last Updated         : 03/23/2016 07:50:35
 Global Time Limit    : 2147483646
 Per-Plan Time Limit  : UNUSED
 Number of Errors     : 0
&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------------------------------------------------
&lt;/span&gt;
SUMMARY SECTION
&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------------------------------------------------
&lt;/span&gt;  Number of plans processed  : 1
  Number of findings         : 2
  Number of recommendations  : 1
  Number of errors           : 0
&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------------------------------------------------
&lt;/span&gt;
DETAILS SECTION
&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------------------------------------------------
&lt;/span&gt; Object ID          : 2
 Test Plan Name     : SQL_PLAN_6bnp3kg5khwxa81486eb4
 Base Plan Name     : SQL_PLAN_6bnp3kg5khwxa275ca563
 SQL Handle         : SQL_65d2a393cb2873aa
 Parsing Schema     : C##MARIS
 Test Plan Creator  : C##MARIS
 SQL Text           : select count(*) from all_ash where module='TEST'

Execution Statistics:
&lt;span class=&quot;gd&quot;&gt;-----------------------------
&lt;/span&gt;                    Base Plan                     Test Plan
                    ----------------------------  ----------------------------
 Elapsed Time (s):  .000302                       .000003
 CPU Time (s):      .000289                       0
 Buffer Gets:       67                            0
 Optimizer Cost:    189                           1
 Disk Reads:        0                             0
 Direct Writes:     0                             0
 Rows Processed:    0                             0
 Executions:        10                            10


FINDINGS SECTION
&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------------------------------------------------
&lt;/span&gt;
Findings (2):
&lt;span class=&quot;gd&quot;&gt;-----------------------------
&lt;/span&gt; 1. The plan was verified in 0.06000 seconds. It passed the benefit criterion
    because its verified performance was 338.14440 times better than that of
    the baseline plan.
 2. The plan was automatically accepted.

Recommendation:
&lt;span class=&quot;gd&quot;&gt;-----------------------------
&lt;/span&gt; Consider accepting the plan.


EXPLAIN PLANS SECTION
&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------------------------------------------------
&lt;/span&gt;
Baseline Plan
&lt;span class=&quot;gd&quot;&gt;-----------------------------
&lt;/span&gt; Plan Id          : 203
 Plan Hash Value  : 660383075

&lt;span class=&quot;gd&quot;&gt;-------------------------------------------------------------------------
&lt;/span&gt;| Id  | Operation            | Name    | Rows | Bytes | Cost | Time     |
       prompt 'Enter value for force_matching (FALSE): ' -
&lt;span class=&quot;gd&quot;&gt;-------------------------------------------------------------------------
&lt;/span&gt;|   0 | SELECT STATEMENT     |         |    1 |    17 |  189 | 00:00:01 |
|   1 |   SORT AGGREGATE     |         |    1 |    17 |      |          |
| * 2 |    TABLE ACCESS FULL | ALL_ASH |    1 |    17 |  189 | 00:00:01 |
&lt;span class=&quot;gd&quot;&gt;-------------------------------------------------------------------------
&lt;/span&gt;
Predicate Information (identified by operation id):
&lt;span class=&quot;gd&quot;&gt;------------------------------------------
&lt;/span&gt;* 2 - filter('MODULE'='TEST')


Test Plan
&lt;span class=&quot;gd&quot;&gt;-----------------------------
&lt;/span&gt; Plan Id          : 204
 Plan Hash Value  : 2169007796

&lt;span class=&quot;gd&quot;&gt;-------------------------------------------------------------------------------
&lt;/span&gt;| Id  | Operation           | Name           | Rows | Bytes | Cost | Time     |
&lt;span class=&quot;gd&quot;&gt;-------------------------------------------------------------------------------
&lt;/span&gt;|   0 | SELECT STATEMENT    |                |    1 |    17 |    1 | 00:00:01 |
|   1 |   SORT AGGREGATE    |                |    1 |    17 |      |          |
| * 2 |    INDEX RANGE SCAN | IX_ALL_ASH_MOD |    1 |    17 |    1 | 00:00:01 |
&lt;span class=&quot;gd&quot;&gt;-------------------------------------------------------------------------------
&lt;/span&gt;
Predicate Information (identified by operation id):
&lt;span class=&quot;gd&quot;&gt;------------------------------------------
&lt;/span&gt;* 2 - access('MODULE'='TEST')

&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------------------------------------------------
&lt;/span&gt;

SQL&amp;gt; explain plan for select count(*) from all_ash where module='TEST';

Explained.

SQL&amp;gt; select * from table(dbms_xplan.display)
  2  ;

PLAN_TABLE_OUTPUT
&lt;span class=&quot;gd&quot;&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
&lt;/span&gt;Plan hash value: 2623139211

&lt;span class=&quot;gd&quot;&gt;------------------------------------------------------------------------------------
&lt;/span&gt;| Id  | Operation         | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
&lt;span class=&quot;gd&quot;&gt;------------------------------------------------------------------------------------
&lt;/span&gt;|   0 | SELECT STATEMENT  |                |     1 |    17 |     1   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE   |                |     1 |    17 |            |          |
|*  2 |   INDEX RANGE SCAN| IX_ALL_ASH_MOD |     1 |    17 |     1   (0)| 00:00:01 |
&lt;span class=&quot;gd&quot;&gt;------------------------------------------------------------------------------------
&lt;/span&gt;
Predicate Information (identified by operation id):
&lt;span class=&quot;gd&quot;&gt;---------------------------------------------------
&lt;/span&gt;
   2 - access('MODULE'='TEST')

Note
&lt;span class=&quot;gd&quot;&gt;-----
&lt;/span&gt;   - SQL plan baseline 'SQL_PLAN_6bnp3kg5khwxa81486eb4' used for this statement
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So the new plan was accepted and baseline &lt;code class=&quot;highlighter-rouge&quot;&gt;SQL_PLAN_6bnp3kg5khwxa81486eb4&lt;/code&gt; became the preferred one.&lt;/p&gt;

&lt;p&gt;In the next step I’ll use &lt;code class=&quot;highlighter-rouge&quot;&gt;create_sql_profile.sql&lt;/code&gt; script that I found on &lt;a href=&quot;http://kerryosborne.oracle-guy.com/2009/04/oracle-sql-profiles/&quot;&gt;this post on Kerry Osborne’s Oracle Blog&lt;/a&gt;. The script extracts the outline hints from the execution plan and packages them into a SQL Profile.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;SQL&amp;gt; select child_number, plan_hash_value from v$sql where sql_id='9kt35fkxmk1qw';

CHILD_NUMBER PLAN_HASH_VALUE
------------ ---------------
           1      3460552988

SQL&amp;gt; @create_sql_profile.sql
Enter value for sql_id: 9kt35fkxmk1qw
Enter value for child_no (0): 1
Enter value for profile_name (PROF_sqlid_planhash):
Enter value for category (DEFAULT):
Enter value for force_matching (FALSE):
old  19: sql_id = '&amp;amp;&amp;amp;sql_id'
new  19: sql_id = '9kt35fkxmk1qw'
old  20: and child_number = &amp;amp;&amp;amp;child_no
new  20: and child_number = 1
old  27: decode('&amp;amp;&amp;amp;profile_name','X0X0X0X0','PROF_&amp;amp;&amp;amp;sql_id'||'_'||plan_hash_value,'&amp;amp;&amp;amp;profile_name')
new  27: decode('X0X0X0X0','X0X0X0X0','PROF_9kt35fkxmk1qw'||'_'||plan_hash_value,'X0X0X0X0')
old  33: sql_id = '&amp;amp;&amp;amp;sql_id'
new  33: sql_id = '9kt35fkxmk1qw'
old  34: and child_number = &amp;amp;&amp;amp;child_no;
new  34: and child_number = 1;
old  39: category =&amp;gt; '&amp;amp;&amp;amp;category',
new  39: category =&amp;gt; 'DEFAULT',
old  41: force_match =&amp;gt; &amp;amp;&amp;amp;force_matching
new  41: force_match =&amp;gt; false
old  52:   dbms_output.put_line('ERROR: sql_id: '||'&amp;amp;&amp;amp;sql_id'||' Child: '||'&amp;amp;&amp;amp;child_no'||' not found in v$sql.');
new  52:   dbms_output.put_line('ERROR: sql_id: '||'9kt35fkxmk1qw'||' Child: '||'1'||' not found in v$sql.');
SQL&amp;gt;
SQL&amp;gt;
SQL&amp;gt; explain plan for select count(*) from all_ash where module='TEST';

Explained.

SQL&amp;gt; select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 3460552988

------------------------------------------------------------------------------
| Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |         |     1 |    17 |   189   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE    |         |     1 |    17 |            |          |
|*  2 |   TABLE ACCESS FULL| ALL_ASH |     1 |    17 |   189   (0)| 00:00:01 |
------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter('MODULE'='TEST')

Note
-----
   - SQL profile 'PROF_9kt35fkxmk1qw_3460552988' used for this statement
   - SQL plan baseline 'SQL_PLAN_6bnp3kg5khwxa275ca563' used for this statement

19 rows selected.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think the result above is one of the most interesting ones in this test, because we see both the SQL Profile and the SQL Plan baseline being used by the SQL statement.
It’s also interesting to observe that after the profile was created, the SQL Plan Baselines that suggests using the full table scan was preferred, although before that the indexed access was preferred. Does this mean that SQL Profiles are &lt;em&gt;stronger&lt;/em&gt; than SQL Plan Baselines? No, because at this moment both of the SQL Plan Baselines are there and the optimizer is allowed to pick any of them. Next, let’s drop SQL Plan Baseline &lt;code&gt;SQL_PLAN_6bnp3kg5khwxa275ca563&lt;/code&gt;, and the only remaining baseline would allow the indexed access.&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;SQL&amp;gt; exec :n:=dbms_spm.drop_sql_plan_baseline(sql_handle=&amp;gt;'SQL_65d2a393cb2873aa',plan_name=&amp;gt;'SQL_PLAN_6bnp3kg5khwxa275ca563');

PL/SQL procedure successfully completed.

SQL&amp;gt; print n

         N
----------
         1

SQL&amp;gt; explain plan for select count(*) from all_ash where module='TEST';

Explained.

SQL&amp;gt; select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 2623139211

------------------------------------------------------------------------------------
| Id  | Operation         | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |                |     1 |    17 |     1   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE   |                |     1 |    17 |            |          |
|*  2 |   INDEX RANGE SCAN| IX_ALL_ASH_MOD |     1 |    17 |     1   (0)| 00:00:01 |
------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access('MODULE'='TEST')

Note
-----
   - SQL profile 'PROF_9kt35fkxmk1qw_3460552988' used for this statement
   - SQL plan baseline 'SQL_PLAN_6bnp3kg5khwxa81486eb4' used for this statement

19 rows selected.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Again, both SQL Profile and the SQL Plan Baseline is reported in the Notes section of the dbms_xplan output, but this time, the index range scan was used although the SQL Profile packages hints that &lt;em&gt;ask&lt;/em&gt; the optimizer to use the full table scan. What changes if the remaining SQL Plan Baseline is removed, but the index and the Profile still remains in place?&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;SQL&amp;gt; exec :n:=dbms_spm.drop_sql_plan_baseline(sql_handle=&amp;gt;'SQL_65d2a393cb2873aa',plan_name=&amp;gt;'SQL_PLAN_6bnp3kg5khwxa81486eb4');

PL/SQL procedure successfully completed.

SQL&amp;gt; print n

         N
----------
         1

SQL&amp;gt; explain plan for select count(*) from all_ash where module='TEST';

Explained.

SQL&amp;gt; select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 3460552988

------------------------------------------------------------------------------
| Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |         |     1 |    17 |   189   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE    |         |     1 |    17 |            |          |
|*  2 |   TABLE ACCESS FULL| ALL_ASH |     1 |    17 |   189   (0)| 00:00:01 |
------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter('MODULE'='TEST')

Note
-----
   - SQL profile 'PROF_9kt35fkxmk1qw_3460552988' used for this statement
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The SQL Profile is tolerated.&lt;/p&gt;

&lt;h3 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h3&gt;

&lt;p&gt;I actually needed this test so that the result stuck better in my head :) The interaction of SQL Profiles and SQL Plan Baselines was already very well explained &lt;a href=&quot;https://blogs.oracle.com/optimizer/entry/what_is_the_different_between&quot;&gt;by Maria Colgan in her blog post “What is the difference between SQL Profiles and SQL Plan Baselines”&lt;/a&gt;? And I confirmed what was stated in the blog post - the SQL Profiles and SQL Plan Baselines don’t work against each other, but they complement each other. While the Baselines define the set of execution plans that can be used by each query, the SQL Profiles only provide additional information to “push” the optimizer to favor one or another plan, but they don’t guarantee the plan would be used.&lt;/p&gt;

&lt;p&gt;That was well visible during the test - while we had both SQL Plan Baselines accepted, the profile was tolerated and the optimizer chose the full table scan plan as “suggested” by the profile. As soon as the FTS plan was removed from Sql Plan Baselines, the “suggestion” from the SQL Profile didn’t have any effect, because there was only one allowed execution plan for the SQL Statement - the one using &lt;code class=&quot;highlighter-rouge&quot;&gt;INDEX RANGE SCAN&lt;/code&gt;, and no SQL Profile can override that. However, as soon as the remaining SQL Plan Baseline was removed, the SQL Profile was again tolerated as at that moment there were no restrictions on which plans were allowed to be used, so again the &lt;code&gt;FULL TABLE SCAN&lt;/code&gt; was used.&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Performance" />
      
        <category term="Internals" />
      

      

      
        <summary type="html">Recently one of my customers asked, what would happen if we had SQL Profile set up for a particular query to make sure it uses the correct execution plan, as well as an existing SQL Plan Baseline for the same query? What would happen if these two features would like the SQL statement to use different execution plans? Which one would win? I hesitated to answer immediately, although the answer seams obvious now. Look how I came to the answer!</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Do AWR Reports Show the Whole Picture?</title>
      
      
      <link href="https://me-dba.com/posts/do-awr-reports-show-the-whole-picture.html" rel="alternate" type="text/html" title="Do AWR Reports Show the Whole Picture?" />
      
      <published>2014-01-26T16:00:00-06:00</published>
      <updated>2014-01-26T16:00:00-06:00</updated>
      <id>https://me-dba.com/posts/do-awr-reports-show-the-whole-picture</id>
      <content type="html" xml:base="https://me-dba.com/posts/do-awr-reports-show-the-whole-picture.html">&lt;p&gt;AWR report is a great source of aggregated information on top activities happening in our databases. I use data collected in AWR quite often, and obviously the easiest way of getting the data out from the AWR is by running the AWR report. In most cases that’s not an issue, but there are certain scenarios when it hides the information one is looking for, just because of how it’s designed. &lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;If I’m trying to collect information about top queries by physical reads, I would normally look at the “SQL ordered by Reads” section and this is what I’d see:&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/AWR-DIsk-reads.png&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/images/AWR-DIsk-reads.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;I have the top SQLs by physical reads – just what I’ve been looking for (except the fact that AWR report covers only one of my RAC nodes).&lt;/p&gt;

&lt;p&gt;But wait a second, what if there are queries that don’t use bind variables? This might be a problem as each query would have it’s own SQL_ID and probably they wouldn’t make it into the TOP10 just because each of them is treated separately. Nothing to worry about – AWR also collects FORCE_MATCHING_SIGNATURE values (read &lt;a href=&quot;https://me-dba.com/2013/01/25/the-easy-way-of-finding-similar-sql-statements/&quot;&gt;this blog post&lt;/a&gt; to understand why I know they would help) and we can use them to identify and group “similar” statements, we just need a custom script to do that.&lt;/p&gt;

&lt;p&gt;Here I use my custom script to report TOP 20 SQL_IDs by physical reads in last 7 days (and I’m reporting data from both RAC nodes in the same list) – you can see the few TOP SQLs are the same as reported in AWR report, but because I’m reporting database-wide statistics instead of instance-wide as AWR does, I have other SQLs on the list too. I’ve also included 2 additional columns:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;DIFF_PLANS – number of different PLAN_HASH_VALUE values reported for this SQL_ID, and if only one is found – it shows the actual PLAN_HASH_VALUE&lt;/li&gt;
  &lt;li&gt;DIFF_FMS – number of different FORCE_MATCHING_SIGNATURE values reported for this SQL_ID, and if only one is found – it shows the actual FORCE_MATCHING_SIGNATURE&lt;/li&gt;
&lt;/ul&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/Custom-Script-sqlid.png&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/images/Custom-Script-sqlid.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;Now, I can adjust the custom script to aggregate the data by FORCE_MATCHING_SIGNATURE, instead of SQL_ID. I’ll still keep the DIFF_PLANS column and will add a new one – DIFF_SQLID.&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/Custom-Script-fms.png&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/images/Custom-Script-fms.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;The situation is a little bit different now. Notice how the second row reports FORCE_MATCHING_SIGNATURE = 0, this typically shows PL/SQL blocks that execute the SQL statements and aggregate statistics from them, so we’re not interested in them. Otherwise the original report by SQL_ID showed quite accurate data in this situation and my suspicions regarding the misuse of literal values where binds should be used, didn’t materialize. Could I be missing anything else? Yes — even the FORCE_MATCHING_SIGNATURE could be misleading in identification of TOP resource consumers, you can write two completely different SQLs (i.e. &lt;code class=&quot;highlighter-rouge&quot;&gt;select * from dual a&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;select * from dual b&lt;/code&gt;) that will do the same thing and will use the same execution plan. Let’s query the top consumers by PLAN_HASH_VALUE to check this theory!&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/Custom-Script-plan.png&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/images/Custom-Script-plan.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;I’ve highlighted the third row as the same PLAN_HASH_VALUE is reported for 20 different SQL_IDs, which allowed it to take the third place in the TOP list by physical reads (actually it’s the second place as PLAN_HASH_VALUE=0 is ignorable). The next query expands the third row:&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/Custom-Script-sqlids-for-plan.png&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/images/Custom-Script-sqlids-for-plan.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;And here are All the SQL statements:&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/All-plan-sqls.png&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/images/All-plan-sqls.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;What I have here is 20 different  views generated by Oracle Discoverer that query the database by using exactly the same execution plan. Closer look revealed the views included hardcoded query parameters (date intervals for reporting), but in the end, this was the same query! It’s the TOP2 query by physical reads. in the database and if I tune it – all 20 discoverer views will benefit.&lt;/p&gt;

&lt;p&gt;I think one of the drawbacks of AWR reports is that it is not able to identify such situations, it would be great if user could choose the column by which he aggregation is done. In the situation I described I was able to identify one of the top queries by physical reads only when I aggregated data by PLAN_HASH_VALUE.&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Performance" />
      

      
        <category term="awr" />
      
        <category term="force_matching_signature" />
      

      
        <summary type="html">AWR report is a great source of aggregated information on top activities happening in our databases. I use data collected in AWR quite often, and obviously the easiest way of getting the data out from the AWR is by running the AWR report. In most cases that’s not an issue, but there are certain scenarios when it hides the information one is looking for, just because of how it’s designed.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">My Experience At UKOUG Tech13</title>
      
      
      <link href="https://me-dba.com/posts/my-experience-at-ukoug-tech13.html" rel="alternate" type="text/html" title="My Experience At UKOUG Tech13" />
      
      <published>2013-12-09T18:08:03-06:00</published>
      <updated>2013-12-09T18:08:03-06:00</updated>
      <id>https://me-dba.com/posts/my-experience-at-ukoug-tech13</id>
      <content type="html" xml:base="https://me-dba.com/posts/my-experience-at-ukoug-tech13.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/my-experience-at-ukoug-tech13/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;UKOUG Tech13 was great! Not only because of the amount of interesting presentations to choose from, but also because of the surrounding events. I felt this conference was quite different from previous UKOUG Oracle Technology &amp;amp; E-Business Suite events in Birmingham (I’ve attended six previous events so you can trust me when I say that.) I decided to take a few notes about my experience at the conference to reveal what made it such a great event to attend.&lt;!--more--&gt;&lt;/p&gt;

&lt;h3 id=&quot;the-changes&quot;&gt;The Changes&lt;/h3&gt;

&lt;p&gt;This was the first year Oracle Apps and Oracle Tech streams were separated in two different conferences. This is a great change for most Oracle DBAs, because the conference is able to concentrate more on Oracle Tech topics. However, I personally missed the opportunity to attend a couple of presentations for Apps DBAs. I usually looked for these presentations at previous events, as UKOUG conferences had been the only events (that I knew of) in Europe that gave a voice to Apps DBAs too. This year, it was no longer possible — on the other hand, I’m not interested in Apps Tech stuff only. I like learning new things about the database too, like performance tuning, internals and advanced troubleshooting. This conference had the widest selection of topics to chose from.&lt;/p&gt;

&lt;p&gt;“Six presentations per company” is another change introduced this year. Alex Gorbachev discusses it more in his blog post &lt;a href=&quot;https://blog.pythian.com/missing-ukoug-tech13-but-still-in-manchester-at-oaktable-world-uk-2013/&quot;&gt;here&lt;/a&gt;. I think this rule makes the conference worse, and not because Pythian had to remove some of the presentations and I couldn’t meet a few other colleagues. Mainly because the overall quality of the topics presented at the conference was artificially decreased. If I was able to suggest an experiment I’d ask UKOUG to remove that rule for the conference next year to check if the average marks from the session feedback surveys increase or decrease when the rule is not applied. I think the score would increase.&lt;/p&gt;

&lt;h3 id=&quot;meeting-and-making-friends-and-having-fun&quot;&gt;Meeting And Making Friends And Having Fun&lt;/h3&gt;

&lt;p&gt;The is the most important part of the conference for me. Nothing attracts so many great people working with the same technology as a good conference. It was great to finally meet some of the community activists that I knew from twitter and blogs only: Øyvind Isene, Osama Mustafa, David Kurtz, Philippe Fierens, Tim Hall, Alex Nuijten, Martin Bach, Elliot Zissman, Alex Zaballa, Fahd Mirza, Marcin Przepiorowski and others I forgot to put on the list. I checked and confirmed the rumors that a great way of making new friends is volunteering for some work. This time I volunteered to be one of the RAC Attack Ninjas and in the end, it was more fun and less work than I expected.&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/ukoug13_1.jpg&quot;&gt;&lt;img alt=&quot;Me and Andrejs Karpovs practicing some useful RAC Attack Ninja moves.&quot; src=&quot;/images/ukoug13_1.jpg&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;Me and Andrejs Karpovs practicing some useful RAC Attack Ninja moves.&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;Having fun is undeniably an important part of the conference. The brain needs to rest from the intense learning experience, and trust me, there were plenty of options to chose from. There were the official social events, and usually some unofficial events too. Take a look! These are my colleagues Michael McKee and Luke Davies discussing how useless Twitter is at one of the unofficial events.&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/ukoug13_2.jpg&quot;&gt;&lt;img alt=&quot;Luke, Twitter is useless!&quot; src=&quot;/images/ukoug13_2.jpg&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;Luke, Twitter is useless!&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;There are ways to spend quality time, even if you’re tired by the end of the conference. The city can offer something you won’t find anywhere else.&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/ukoug13_3.jpg&quot;&gt;&lt;img alt=&quot;Attending Manchester United vs Everton&quot; src=&quot;/images/ukoug13_3.jpg&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;Attending Manchester United vs Everton&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;h3 id=&quot;the-twitter&quot;&gt;The Twitter&lt;/h3&gt;

&lt;p&gt;Oh man, this was intense. I’m glad I had prepared for this by buying an extra battery for my phone – the money was well spent. The statistics – 150 tweets in 5 days. This doesn’t sound too much, just 30 tweets a day, but for me, who had been doing an average of ~1 tweet a day, it was a lot. I even saw my name in twitter analytics board in place 3 ranked by twitter mentions, but this most likely is because @UKOUG retweeted almost all of my tweets!&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/ukoug13_4.jpg&quot;&gt;&lt;img alt=&quot;Twitter Analytics by Rittman Mead&quot; src=&quot;/images/ukoug13_4.jpg&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;Twitter Analytics by Rittman Mead&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;At one point, I almost quit tweeting from the conference but one tweet kept me going:&lt;/p&gt;

&lt;center&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;&lt;a href=&quot;https://twitter.com/MarisElsins?ref_src=twsrc%5Etfw&quot;&gt;@MarisElsins&lt;/a&gt; seems to be the only dba in &lt;a href=&quot;https://twitter.com/hashtag/ukoug_tech13?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#ukoug_tech13&lt;/a&gt; who tweets about contents of sessions, rather than their title or praise for speaker!&lt;/p&gt;&amp;mdash; Babak Tourani (@2ndhalf_oracle) &lt;a href=&quot;https://twitter.com/2ndhalf_oracle/status/407534890758836224?ref_src=twsrc%5Etfw&quot;&gt;December 2, 2013&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;/center&gt;

&lt;p&gt;If you asked me which of my tweets highlights the experiences in the conference best, I’d choose this one, which also brings me to the next topic – my presentation.&lt;/p&gt;

&lt;center&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;OMG! This is the room for my session on Wednesday. :o &lt;a href=&quot;https://twitter.com/hashtag/Panic?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Panic&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/ukoug_tech13?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#ukoug_tech13&lt;/a&gt; &lt;a href=&quot;http://t.co/rXDqtCkjH3&quot;&gt;pic.twitter.com/rXDqtCkjH3&lt;/a&gt;&lt;/p&gt;&amp;mdash; Maris Elsins (@MarisDBA) &lt;a href=&quot;https://twitter.com/MarisDBA/status/407514163347746817?ref_src=twsrc%5Etfw&quot;&gt;December 2, 2013&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;/center&gt;

&lt;h3 id=&quot;my-presentation&quot;&gt;My Presentation&lt;/h3&gt;

&lt;p&gt;OK, this was not really my presentation. The topic was submitted by a good friend of mine – Yury Velikanov, who was not able to attend the conference. I volunteered to present the paper as I thought it would be easy – topic by Yury, slides by Yury, speech by Maris. I was not a first-time presenter. I actually counted around 15 presentations I had delivered at international conferences all done in English (not my native language as you might have noticed by reading this blog), so I felt confident. I had seen Yury present the topic, I had checked the slides carefully and changed a few things, I understood the topic, so what could possibly go wrong? Anything. There were two things that went wrong for me.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The Auditorium. This was the first time I presented in the largest room at the conference. I found out which room it was on Monday. The presentation was on Wednesday, so I had two full days to panic. Having the biggest room had put additional pressure on the task and yes I was worried.&lt;/li&gt;
  &lt;li&gt;I and two other Pythian speakers – Luke Davies and Michael McKee – decided to rehearse the presentations in a hotel room on Tuesday afternoon. And I’m glad we did, because I struggled a lot – I was not able to formulate the thought fluently, and I was not able to do much more than reading the bullet points. There were couple of complicated slides that I couldn’t explain at all. My morale went down to zero, and panic levels skyrocketed. But I’m extremely glad we did the rehearsal, as I found out I was not ready at all by that time. That day I spent 6 hours preparing for the presentation. I reviewed all the slides again, and again. I put down some notes, which I never do for my own presentations. I tested few things that I wasn’t 100% sure would work, as I had to present them. I exchanged a number of thoughts with Luke and at 2AM I closed the laptop.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;My presentation “&lt;a href=&quot;https://www.slideshare.net/mariselsins/10-ways-to-improve-your-rman-script-28880098&quot;&gt;10 Ways to improve your RMAN script&lt;/a&gt;” was scheduled for 10:05 on Wednesday. I got up early to rehearse it one more time in front of the hotel mirror — I felt I was much more fluent, but I was still not satisfied. At that time there was nothing more to do and the auditorium was waiting for me. I can’t say much about my own performance. I only remember all panic disappeared in first 3 minutes of the presentation; In fact, I panicked much more in front of the mirror than on the stage — I think I did OK. Not perfect, but OK. The most important thing for me was to come to these conclusions:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Presenting a topic which I didn’t write is much more difficult. I usually think a lot about the topic before submitting it, and I know large part of the content I’m going to include in the presentation. I missed this stage of preparation and therefore had to spend way more time on working through the slides to prepare the speech.&lt;/li&gt;
  &lt;li&gt;Rehearse the presentation at least a day before the show. This reveals how ready I am and I can still use the time left to improve the presentations.&lt;/li&gt;
  &lt;li&gt;Rehearse the presentation shortly before they “go live” on the day of the speech. This reduces my panic levels and puts my brain on track for the topic aI present.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m looking forward to receiving the session evaluations as this was a unique experience for me and I really hope I didn’t disappoint anyone. I appreciate the support and feedback I received on twitter. Thank you for that. And thanks to Yury for trusting the delivery of his presentation to me.&lt;/p&gt;

&lt;h3 id=&quot;learning&quot;&gt;Learning&lt;/h3&gt;

&lt;p&gt;There were many  great presentations but these are the ones I enjoyed the most. I’ve already managed to use some of the lessons I learned from these sessions in my day-to-day work.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Jonathan Lewis: “Compression: Index, basic and OLTP”&lt;/li&gt;
  &lt;li&gt;James Morle: “Optimal Oracle Configuration for Efficient Table Scanning”&lt;/li&gt;
  &lt;li&gt;David Kurtz: “Partition, Archive, Compress, Purge – Keep your ERP on the Road”&lt;/li&gt;
  &lt;li&gt;Christo Kutrovsky: “Maximise Data Warehouse Performance with Parallel Queries”&lt;/li&gt;
  &lt;li&gt;Frits Hoogland: “Hacking session: Advanced profiling of Oracle using function calls” – this was the only presentation I attended at “OakTable World UK 2013” conference.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;This is the short summary of my experiences. I’m really happy I was able to attend the conference and meet all the people I usually meet virtually. I’m already waiting for UKOUG Tech14. See you there!&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Presentations" />
      

      

      
        <summary type="html">This blog post was originally released on Pythian blog UKOUG Tech13 was great! Not only because of the amount of interesting presentations to choose from, but also because of the surrounding events. I felt this conference was quite different from previous UKOUG Oracle Technology &amp;amp; E-Business Suite events in Birmingham (I’ve attended six previous events so you can trust me when I say that.) I decided to take a few notes about my experience at the conference to reveal what made it such a great event to attend.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">getMOSPatch.sh - Downloading Patches From My Oracle Support</title>
      
      
      <link href="https://me-dba.com/posts/getmospatch-sh-downloading-patches-from-my-oracle-support.html" rel="alternate" type="text/html" title="getMOSPatch.sh - Downloading Patches From My Oracle Support" />
      
      <published>2013-11-11T18:08:03-06:00</published>
      <updated>2013-11-11T18:08:03-06:00</updated>
      <id>https://me-dba.com/posts/getmospatch-sh-downloading-patches-from-my-oracle-support</id>
      <content type="html" xml:base="https://me-dba.com/posts/getmospatch-sh-downloading-patches-from-my-oracle-support.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/getmospatch-sh-downloading-patches-from-my-oracle-support/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How to download patches from My Oracle Support (MOS) directly to the server? This has bothered me since the ftp access was closed a few years ago. Of course, I’ve been given some options by Oracle, like, I could access MOS from the server using a browser (probably from a VNC desktop - thank you very much), or I could look up the patches on my workstation to download the WGET script from MOS, which I uploaded to the server, adjusted with the username and the password of my MOS account and then started the downloads. Not too convenient, is it?&lt;/p&gt;

&lt;p&gt;Then, back in 2009 my teammate &lt;a href=&quot;http://www.pythian.com/blog/author/piwowar&quot;&gt;John Piwowar&lt;/a&gt; published a blog post on [Retrieving Oracle patches with wget(http://only4left.jpiwowar.com/2009/02/retrieving-oracle-patches-with-wget). This eliminated the need to upload the wget script from MOS to the server and I only had to get the URLs of the patches and pass them to a shell function. While this was so much easier, I still needed to open the browser to find those URLs.&lt;/p&gt;

&lt;p&gt;I think it’s time to get rid of browser dependency. So I’ve written a shell script [getMOSPatch.sh(http://bit.ly/getMOSPatch) that can be used to download patches directly to the server using only the patch number.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;I’ve tested the tool on Linux, and there is a good chance it won’t work on some other platforms as it utilizes tools like &lt;code class=&quot;highlighter-rouge&quot;&gt;awk&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;sed&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;grep&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;egrep&lt;/code&gt; and &lt;code&gt;wget&lt;/code&gt; with options that probably only work on Linux, but if there’s much interest in this tool and I get many comments on this blog post I promise to change that :)&lt;/p&gt;

&lt;p&gt;You can use wget to download the script to the server directly:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[oracle@mel1 Patches]$ wget --no-check-certificate -nv https://raw.github.com/MarisElsins/TOOLS/master/Shell/getMOSPatch.sh
WARNING: cannot verify raw.github.com's certificate, issued by `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3':
  Unable to locally verify the issuer's authority.
2013-11-10 17:42:17 URL:https://raw.github.com/MarisElsins/TOOLS/master/Shell/getMOSPatch.sh [4021/4021] -&amp;gt; 'getMOSPatch.sh' [1]
[oracle@mel1 Patches]$ chmod u+x getMOSPatch.sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;First time you run the script (or when you run it with parameter reset=yes) it will let you choose which platforms and languages the patches need to be downloaded for and the choices will be saved in a configuration file. The available platforms and languages are fetched from MOS.&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[oracle@mel1 Patches]$ ./getMOSPatch.sh reset=yes
Oracle Support Userid: elsins@pythian.com
Oracle Support Password:

Getting the Platform/Language list
Available Platforms and Languages:
527P - Acme Packet OS
293P - Apple Mac OS X (Intel) (32-bit)
522P - Apple Mac OS X (Intel) (64-bit)
...
226P - Linux x86-64
912P - Microsoft Windows (32-bit)
...
7L - Finnish (SF)
2L - French (F)
4L - German (D)
104L - Greek (EL)
107L - Hebrew (IW)
...
39L - Ukrainian (UK)
43L - Vietnamese (VN)
999L - Worldwide Spanish (ESW)
Comma-delimited list of required platform and language codes: 226P,4L
[oracle@mel1 Patches]$
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After this you simply have to run the script with parameter &lt;strong&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;patch=patchnr1,patchnr2,...&lt;/code&gt;&lt;/strong&gt; and the listed patches will be downloaded. This is how it happens:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The script looks up each of the patches for each platform and language and:
    &lt;ul&gt;
      &lt;li&gt;if one patch is found - it is automatically downloaded&lt;/li&gt;
      &lt;li&gt;if multiple patches are found (this can happen if the same patch is available for multiple releases) - the tool will ask you to choose which patches to download.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;you can also specify parameter &lt;strong&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;download=all&lt;/code&gt;&lt;/strong&gt; to download all found patches without being asked to choose ones from the list.&lt;/li&gt;
  &lt;li&gt;you can also specify parameter &lt;strong&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;regexp&lt;/code&gt;&lt;/strong&gt; to apply filters to the filenames of the looked up patches. This is especially useful for Apps DBAs as filter &lt;strong&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;regexp=&quot;.*A_R12.*&quot;&lt;/code&gt;&lt;/strong&gt; would be helpful for e-Business Suite Release 12.0 and &lt;strong&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;regexp=&quot;.*B_R12.*&quot;&lt;/code&gt;&lt;/strong&gt; - for R12.1.&lt;/li&gt;
  &lt;li&gt;if you set environment variables &lt;strong&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;mosUser&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;mosPass&lt;/code&gt;&lt;/strong&gt; before running the script you won’t be asked to enter the user credentials.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Take a look at the following examples:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;downloading the latest CPU patch (patch 16902043, OCT2013) for 11gR2.&lt;/p&gt;

    &lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[oracle@mel1 Patches]$ ./getMOSPatch.sh patch=16902043
Oracle Support Userid: elsins@pythian.com
Oracle Support Password:

Getting patch 16902043 for 'Linux x86-64';
p16902043_112030_Linux-x86-64.zip completed with status: 0

Getting patch 16902043 for 'German (D)';
no patch available
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Downloading multiple patches at the same time without prompting user to specify which files to download if multiple files are found. (don’t be confused that files with “LINUX” and not “Linux-x86-64” in the filename are downloaded here. These are e-Business Suite patches and both 32b and 64b platforms have the same patch):&lt;/p&gt;

    &lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[oracle@mel1 Patches]$ ./getMOSPatch.sh patch=10020251,10141333 download=all
Oracle Support Userid: elsins@pythian.com
Oracle Support Password:

Getting patch 10020251 for 'Linux x86-64'
p10020251_R12.AR.B_R12_LINUX.zip completed with status: 0
p10020251_R12.AR.A_R12_LINUX.zip completed with status: 0

Getting patch 10020251 for 'German (D)'
p10020251_R12.AR.A_R12_d.zip completed with status: 0

Getting patch 10141333 for 'Linux x86-64'
p10141333_R12.AR.A_R12_LINUX.zip completed with status: 0
p10141333_R12.AR.B_R12_LINUX.zip completed with status: 0

Getting patch 10141333 for 'German (D)'
p10141333_R12.AR.B_R12_d.zip completed with status: 0
p10141333_R12.AR.A_R12_d.zip completed with status: 0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Downloading the same patches as in the previous example with an additional filter for e-Business Suite 12.1 patches only:&lt;/p&gt;

    &lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[oracle@mel1 Patches]$ ./getMOSPatch.sh regexp='.*B_R12.*' patch=10020251,10141333 download=all
Oracle Support Userid: elsins@pythian.com
Oracle Support Password:

Getting patch 10020251 for 'Linux x86-64'
p10020251_R12.AR.B_R12_LINUX.zip completed with status: 0

Getting patch 10020251 for 'German (D)'
no patch available

Getting patch 10141333 for 'Linux x86-64'
p10141333_R12.AR.B_R12_LINUX.zip completed with status: 0

Getting patch 10141333 for 'German (D)'
p10141333_R12.AR.B_R12_d.zip completed with status: 0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Oracle e-Business Suite" />
      
        <category term="Tools" />
      
        <category term="Maintenance" />
      

      
        <category term="download" />
      
        <category term="getmospatch" />
      
        <category term="my oracle support" />
      
        <category term="patch" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog How to download patches from My Oracle Support (MOS) directly to the server? This has bothered me since the ftp access was closed a few years ago. Of course, I’ve been given some options by Oracle, like, I could access MOS from the server using a browser (probably from a VNC desktop - thank you very much), or I could look up the patches on my workstation to download the WGET script from MOS, which I uploaded to the server, adjusted with the username and the password of my MOS account and then started the downloads. Not too convenient, is it? Then, back in 2009 my teammate John Piwowar published a blog post on [Retrieving Oracle patches with wget(http://only4left.jpiwowar.com/2009/02/retrieving-oracle-patches-with-wget). This eliminated the need to upload the wget script from MOS to the server and I only had to get the URLs of the patches and pass them to a shell function. While this was so much easier, I still needed to open the browser to find those URLs. I think it’s time to get rid of browser dependency. So I’ve written a shell script [getMOSPatch.sh(http://bit.ly/getMOSPatch) that can be used to download patches directly to the server using only the patch number.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Mining the AWR to Identify Performance Trends</title>
      
      
      <link href="https://me-dba.com/posts/mining-the-awr-to-identify-performance-trends.html" rel="alternate" type="text/html" title="Mining the AWR to Identify Performance Trends" />
      
      <published>2013-11-04T12:56:57-06:00</published>
      <updated>2013-11-04T12:56:57-06:00</updated>
      <id>https://me-dba.com/posts/mining-the-awr-to-identify-performance-trends</id>
      <content type="html" xml:base="https://me-dba.com/posts/mining-the-awr-to-identify-performance-trends.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/mining-the-awr-to-identify-performance-trends/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sometimes it’s useful to check how performance of a SQL statement changes over time. The diagnostic pack features provide some really useful information to answer these questions. The data is there, but it not always easy to retrieve it, especially if you want to see how the performance changes over time. I’ve been using three really simple scripts to retrieve this information from the AWR. These scripts help me answer the following questions:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;How does the performance of a particular SQL change over time?&lt;/li&gt;
  &lt;li&gt;How do wait times of a particular wait event change over time?&lt;/li&gt;
  &lt;li&gt;How does a particular statistic change over time?&lt;!--more--&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;_ &lt;strong&gt;Please note&lt;/strong&gt;, the scripts provided here require diagnostic pack licenses and it’s your task to make sure you have them before running the scripts._&lt;/p&gt;

&lt;h3 id=&quot;sql-performance&quot;&gt;SQL performance&lt;/h3&gt;

&lt;p&gt;I use script &amp;lt;a &lt;a href=&quot;https://github.com/MarisElsins/TOOLS/blob/master/SQL/AWR/awr_sqlid_perf_trend.sql&quot;&gt;
awr_sqlid_perf_trend.sql&lt;/a&gt; to check how performance of the SQL changes over time. The script summarizes the data from DBA_HIST_SQLSTAT and reports the average statistics for a single execution of the query during the reporting interval. It requires 3 input parameters:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;SQL ID&lt;/li&gt;
  &lt;li&gt;Days to report. It will summarize all AWR snapshots starting with “trunc(sysdate)-{days to report}+1”, so if you pass “1”, it will summarize all snapshots from today, if “2” - than it’s yesterday and today are included.&lt;/li&gt;
  &lt;li&gt;Interval in hours. “24” will provide one row for each day, “6” will give 4 rows a day.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Nothing shows it better than an example. Below you see how I’m checking execution statistics for sql_id fd7rrqkn1k2xb by summarizing the AWR information captured in last 2 weeks and reporting the average values for 2-day intervals. Then I’m taking a little closer look at the last 4 days for the same SQL by summarizing data over 6hour intervals. Note, the time column shows the beginning of the interval.&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;awr_sqlid_perf_trend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;sql&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fd7rrqkn1k2xb&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;48&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TIME&lt;/span&gt;                 &lt;span class=&quot;n&quot;&gt;EXECUTIONS&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ELAPSED_TIME_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CPU_TIME_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IOWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CLWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;APWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CCWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ROWS_PROCESSED_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BUFFER_GETS_1EXEC&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;DISK_READS_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DIRECT_WRITES_1EXEC&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;------------------- ----------- -------------------- ---------------- -------------- -------------- -------------- -------------- -------------------- ----------------- ----------------- -------------------&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;351&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;195&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;571&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;74&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;995&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;097&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;134417&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;570&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;21319182&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;291&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;293731&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;556&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;304434&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;305&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;364&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;91&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;225&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;47&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;474&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;687&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;002&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;141140&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;228&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;20364053&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;544&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;270107&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;745&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;273343&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;709&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;542&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;686&lt;/span&gt;            &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;378&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;004&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;146436&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;875&lt;/span&gt;       &lt;span class=&quot;mi&quot;&gt;4597922&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;220&lt;/span&gt;             &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;531&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;060&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;086&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;161&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;146476&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;605&lt;/span&gt;       &lt;span class=&quot;mi&quot;&gt;6026729&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;224&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;23999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;684&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;23998&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;859&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;542&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;51&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;611&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;40&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;675&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;880&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;146814&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;220&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;21620264&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;039&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;287994&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;862&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;287994&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;701&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;534&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;39&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;949&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;688&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;050&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147099&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;275&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;14081016&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;607&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;159704&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;463&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;159704&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;418&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;245&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;37&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;837&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;384&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;150&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147135&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;216&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;15505533&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;959&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;179244&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;437&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;179244&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;367&lt;/span&gt;

&lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;awr_sqlid_perf_trend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;sql&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fd7rrqkn1k2xb&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TIME&lt;/span&gt;                 &lt;span class=&quot;n&quot;&gt;EXECUTIONS&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ELAPSED_TIME_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CPU_TIME_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IOWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CLWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;APWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CCWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ROWS_PROCESSED_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BUFFER_GETS_1EXEC&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;DISK_READS_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DIRECT_WRITES_1EXEC&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;------------------- ----------- -------------------- ---------------- -------------- -------------- -------------- -------------- -------------------- ----------------- ----------------- -------------------&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;72&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;19&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;209&lt;/span&gt;            &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;439&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147076&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;       &lt;span class=&quot;mi&quot;&gt;4623816&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;597&lt;/span&gt;              &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;111&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;06&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;72&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;391&lt;/span&gt;            &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;401&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147086&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;403&lt;/span&gt;       &lt;span class=&quot;mi&quot;&gt;4624153&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;819&lt;/span&gt;              &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;72&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;022&lt;/span&gt;            &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;351&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147099&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;       &lt;span class=&quot;mi&quot;&gt;4624579&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;639&lt;/span&gt;              &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;55&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;48&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;174&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;35&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;723&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;575&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147099&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;19192781&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;582&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;243584&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;055&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;243584&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;055&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;72&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;76&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;723&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;350&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;116&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147099&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;23258326&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;875&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;314445&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;111&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;314445&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;111&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;06&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;72&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;921&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;914&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;084&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147107&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;542&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;23258506&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;028&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;315673&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;315673&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;72&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;52&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;567&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;383&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;041&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147116&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;23258739&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;403&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;315673&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;315673&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;47&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;522&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;095&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;523&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147117&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;532&lt;/span&gt;       &lt;span class=&quot;mi&quot;&gt;9382873&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;851&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;80597&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;702&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;80597&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;362&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;65&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;645&lt;/span&gt;            &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;384&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147120&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;       &lt;span class=&quot;mi&quot;&gt;4625354&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;262&lt;/span&gt;              &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;06&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;19&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;571&lt;/span&gt;            &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;451&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147122&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;421&lt;/span&gt;       &lt;span class=&quot;mi&quot;&gt;4625411&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;263&lt;/span&gt;              &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;083&lt;/span&gt;            &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;645&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147208&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;167&lt;/span&gt;       &lt;span class=&quot;mi&quot;&gt;4629315&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;167&lt;/span&gt;              &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;48&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;42&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;173&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;35&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;208&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;509&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147236&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;375&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;18606643&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;833&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;229433&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;750&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;229433&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;750&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;72&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;53&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;015&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;517&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;022&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147245&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;125&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;23265547&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;847&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;314507&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;319&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;314507&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;083&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;06&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;52&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;181&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;638&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;932&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;147250&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;23265839&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;767&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;303949&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;303949&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;59&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;576&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;836&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;177&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;144049&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;800&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;23267109&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;200&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;227814&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;227814&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;

&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I’ve checked this SQL because the users reported inconsistent performance. It can also be observed in the outputs above. Take a look! The number of rows processed during each execution of the SQL doesn’t change - it’s always around 147K, but look at the disk reads and the direct writes! These values can be around zero, but then they suddenly jump up to 300K, and when they do, the buffer gets increase too and the CPU time goes up from 9 seconds to 43. Based on the information above it looks like there could be two different execution plans involved and bind variable peeking could be causing one or the other plan to become the active plan.
Additionally you can use the same script to check how execution statistics for the same SQL change over time. Does the elapsed time increase? Do the number of processed rows or number of buffer gets per execution change?&lt;/p&gt;

&lt;h3 id=&quot;wait-event-performance&quot;&gt;Wait event performance&lt;/h3&gt;

&lt;p&gt;Script &lt;a href=&quot;https://github.com/MarisElsins/TOOLS/blob/master/SQL/AWR/awr_wait_trend.sql&quot;&gt;awr_wait_trend.sql&lt;/a&gt; can be used to  show the changes in wait counts and wait durations for a particular event over time. Similarly to the previous script it also requires 3 parameters, only instead of SQL ID you pass the name of the wait event. This time the data comes from DBA_HIST_SYSTEM_EVENT. I typically use this script in two situations:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;To check if a particular wait event performs worse when an overall performance problem is reported (usually I’m looking at IO events)&lt;/li&gt;
  &lt;li&gt;Illustrate how the implemented change improved the situation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The example below shows how the performance of log file parallel write event changed over 3 weeks. On october 19th we moved the redo logs to dedicated high performance LUNs. Before that the 2 members of each redo log group were located on a saturated LUN together with all the data files.&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;awr_wait_trend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;sql&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'log file parallel write'&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;21&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TIME&lt;/span&gt;                &lt;span class=&quot;n&quot;&gt;EVENT_NAME&lt;/span&gt;                       &lt;span class=&quot;n&quot;&gt;TOTAL_WAITS&lt;/span&gt;   &lt;span class=&quot;n&quot;&gt;TOTAL_TIME_S&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;AVG_TIME_MS&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;------------------- ---------------------------- --------------- -------------- --------------&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;09&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;4006177&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;31667&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;591&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;905&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;3625342&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;28296&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;640&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;805&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;3483249&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;31032&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;324&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;909&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;3293462&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;33351&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;490&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;127&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;2871091&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;36413&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;925&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;683&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;3763916&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;30262&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;718&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;040&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;3018760&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;28262&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;172&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;362&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;3303205&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;31062&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;276&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;404&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;3012105&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;31831&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;491&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;568&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;2692697&lt;/span&gt;      &lt;span class=&quot;mi&quot;&gt;26981&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;966&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;020&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;19&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;1038399&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;512&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;950&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;494&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;               &lt;span class=&quot;mi&quot;&gt;959443&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;427&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;554&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;446&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;21&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;1520444&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;606&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;580&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;399&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;1618490&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;655&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;873&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;405&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;23&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;1889845&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;751&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;216&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;398&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;1957384&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;760&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;656&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;389&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;2204260&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;853&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;691&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;387&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;2205783&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;856&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;731&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;388&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;2033199&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;785&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;785&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;386&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;2439092&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;923&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;368&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;379&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parallel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;write&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;2233614&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;840&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;628&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;376&lt;/span&gt;

&lt;span class=&quot;mi&quot;&gt;21&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Visualizing the data from output like that is easy too!&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/log_file_parall_write_trend.png&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/images/log_file_parall_write_trend.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;h3 id=&quot;system-statistics&quot;&gt;System Statistics&lt;/h3&gt;

&lt;p&gt;The last script from this set is &lt;a href=&quot;https://github.com/MarisElsins/TOOLS/blob/master/SQL/AWR/awr_stat_trend.sql&quot;&gt;awr_stat_trend.sql&lt;/a&gt;. It does the same thing with the system statistics collected in DBA_HIST_SYSSTAT as previous scripts did to the performance of SQLs and wait events. The parameters are similar again - the name of the system statistic, days to report and the interval. I usually use the query to check how the redo size or the number of physical reads change over time, but there’s huge number of statistics available (638 different statistics in 11.2.0.3) and that’s why I’m sure you’ll find your own reasons to use this script.&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;awr_stat_trend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;sql&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'redo size'&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TIME&lt;/span&gt;                &lt;span class=&quot;n&quot;&gt;STAT_NAME&lt;/span&gt;                             &lt;span class=&quot;n&quot;&gt;VALUE&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;------------------- ------------------------- -----------------&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;1739466208&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;04&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;2809857936&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;08&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                         &lt;span class=&quot;mi&quot;&gt;648511376&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                         &lt;span class=&quot;mi&quot;&gt;533287888&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                         &lt;span class=&quot;mi&quot;&gt;704832684&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                         &lt;span class=&quot;mi&quot;&gt;819854908&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;2226799060&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;04&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;3875182764&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;08&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;1968024072&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;1125339352&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;1067175300&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                         &lt;span class=&quot;mi&quot;&gt;936404908&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;1758952428&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;04&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;3949193948&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;08&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;1715444632&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                        &lt;span class=&quot;mi&quot;&gt;1008385144&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redo&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;size&lt;/span&gt;                         &lt;span class=&quot;mi&quot;&gt;544946804&lt;/span&gt;

&lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/redo_size.png&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/images/redo_size.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;hr /&gt;

&lt;p&gt;AWR is a gold mine, but you need the right tools for digging. I hope the scripts will be useful for you too!
P.S. You might have noticed the scripts are published on GitHub, let me know if you find any issues using them and perhaps one day you’ll find new versions for the script.&lt;/p&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;update-4-nov-2013&quot;&gt;Update (4-Nov-2013)&lt;/h3&gt;

&lt;p&gt;I’ve added the instance numbers to the outputs in all three scripts. This is how it looks now:&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;awr_sqlid_perf_trend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;sql&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fxqsqwhkn03b&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;48&lt;/span&gt;

 &lt;span class=&quot;n&quot;&gt;INST&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TIME&lt;/span&gt;                 &lt;span class=&quot;n&quot;&gt;EXECUTIONS&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ELAPSED_TIME_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CPU_TIME_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IOWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CLWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;APWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CCWAIT_S_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ROWS_PROCESSED_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BUFFER_GETS_1EXEC&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;DISK_READS_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DIRECT_WRITES_1EXEC&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;----- ------------------- ----------- -------------------- ---------------- -------------- -------------- -------------- -------------- -------------------- ----------------- ----------------- -------------------&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;840&lt;/span&gt;                 &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;611&lt;/span&gt;             &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;014&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;595&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;007&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1085&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;583&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;128&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;724&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
      &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;1466&lt;/span&gt;                 &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;491&lt;/span&gt;             &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;011&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;479&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;005&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;976&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;001&lt;/span&gt;            &lt;span class=&quot;mi&quot;&gt;88&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;744&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
      &lt;span class=&quot;mi&quot;&gt;01&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;542&lt;/span&gt;                 &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;798&lt;/span&gt;             &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;023&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;760&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;025&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;896&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;978&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;114&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;196&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
      &lt;span class=&quot;mi&quot;&gt;03&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;544&lt;/span&gt;                 &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;750&lt;/span&gt;             &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;021&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;719&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;017&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1098&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;213&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;134&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;941&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;

    &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;1638&lt;/span&gt;                 &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;498&lt;/span&gt;             &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;017&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;474&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;013&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;001&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;953&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;514&lt;/span&gt;            &lt;span class=&quot;mi&quot;&gt;96&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;287&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
      &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;1014&lt;/span&gt;                 &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;745&lt;/span&gt;             &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;022&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;712&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;019&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1034&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;249&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;131&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;057&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
      &lt;span class=&quot;mi&quot;&gt;01&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;1904&lt;/span&gt;                 &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;633&lt;/span&gt;             &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;011&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;624&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;002&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1045&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;668&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;104&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;568&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
      &lt;span class=&quot;mi&quot;&gt;03&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;810&lt;/span&gt;                 &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;602&lt;/span&gt;             &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;017&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;581&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;010&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;929&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;778&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;108&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;998&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;


&lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Performance" />
      
        <category term="Tools" />
      

      
        <category term="awr" />
      
        <category term="data mining" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog Sometimes it’s useful to check how performance of a SQL statement changes over time. The diagnostic pack features provide some really useful information to answer these questions. The data is there, but it not always easy to retrieve it, especially if you want to see how the performance changes over time. I’ve been using three really simple scripts to retrieve this information from the AWR. These scripts help me answer the following questions: How does the performance of a particular SQL change over time? How do wait times of a particular wait event change over time? How does a particular statistic change over time?</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Meaning of “Disk Reads” Values in DBA_HIST_SQLSTAT</title>
      
      
      <link href="https://me-dba.com/posts/meaning-disk-reads-values-dba_hist_sqlstat.html" rel="alternate" type="text/html" title="Meaning of &quot;Disk Reads&quot; Values in DBA_HIST_SQLSTAT" />
      
      <published>2013-11-01T15:38:58-05:00</published>
      <updated>2013-11-01T15:38:58-05:00</updated>
      <id>https://me-dba.com/posts/meaning-disk-reads-values-dba_hist_sqlstat</id>
      <content type="html" xml:base="https://me-dba.com/posts/meaning-disk-reads-values-dba_hist_sqlstat.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/meaning-of-disk-reads-values-in-dba_hist_sqlstat/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This post relates to my previous writing on &lt;a href=&quot;/2013/11/mining-the-awr-to-identify-performance-trends.html&quot;&gt;mining the AWR&lt;/a&gt;. I noticed that it’s very easy to misinterpret the DISK_READS_TOTAL and DISK_READS_DELTA columns in DBA_HIST_SQLSTAT. Let’s see what &lt;a href=&quot;http://docs.oracle.com/cd/E18283_01/server.112/e17110/statviews_4051.htm&quot;&gt;the documentation&lt;/a&gt; says:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;strong&gt;DISK_READS_TOTAL&lt;/strong&gt; - Cumulative number of disk reads for this child cursor&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;DISK_READS_DELTA&lt;/strong&gt; - Delta number of disk reads for this child cursor&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;You might think it’s clear enough and that’s exactly what I thought too. The number of disk reads is the number of IO requests to the storage. But is it really true?&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;I started suspecting something was not right after using my own &lt;code class=&quot;highlighter-rouge&quot;&gt;awr_sqlid_perf_trend.sql&lt;/code&gt; script (see more details on this script &lt;a href=&quot;(/2013/11/mining-the-awr-to-identify-performance-trends.html)&quot;&gt;here&lt;/a&gt;. I noticed the DISK_READS_DELTA values were too close to BUFFER_GETS_DELTA values for queries that use full table scans, which are normally executed using multi-block IO requests to the storage. I was expecting disk reads to be at least two times lower than the buffer gets, but it was something closer to 90% in a few cases. So was I looking at the number of IO requests or the number of blocks read from disks? The best way to find it out was a test case.&lt;/p&gt;

&lt;p&gt;The following testing was done in an 11.2.0.3 database:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;I created a new AWR snapshot and enabled tracing for my session. I made sure the &lt;code class=&quot;highlighter-rouge&quot;&gt;db_file_multiblock_read_count&lt;/code&gt; parameter was set to a high value and then executed a SQL that was forced to use a full table scan (FTS) to read the data from disks. Another AWR snapshot was taken after that.&lt;/p&gt;

    &lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;alter&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;session&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tracefile_identifier&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'TEST1'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Session&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;altered&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;show&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;parameter&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;multiblock&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;NAME&lt;/span&gt;                                 &lt;span class=&quot;k&quot;&gt;TYPE&lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;VALUE&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;------------------------------------ ----------- ------------------------------&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;db_file_multiblock_read_count&lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;integer&lt;/span&gt;     &lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;alter&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;system&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;db_file_multiblock_read_count&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;128&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;System&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;altered&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;show&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;parameter&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;multiblock&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;NAME&lt;/span&gt;                                 &lt;span class=&quot;k&quot;&gt;TYPE&lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;VALUE&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;------------------------------------ ----------- ------------------------------&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;db_file_multiblock_read_count&lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;integer&lt;/span&gt;     &lt;span class=&quot;mi&quot;&gt;128&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;exec&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dbms_workload_repository&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;create_snapshot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;PL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;procedure&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;successfully&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;completed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;alter&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;session&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;max_dump_file_size&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;unlimited&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Session&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;altered&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;alter&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;system&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;events&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'10046 trace name context forever, level 12'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;System&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;altered&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/*+ full(a) */&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;I_DATA&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tpcc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;COUNT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;I_DATA&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-------------&lt;/span&gt;
       &lt;span class=&quot;mi&quot;&gt;100000&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;exec&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dbms_workload_repository&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;create_snapshot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;PL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;procedure&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;successfully&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;completed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I found the sql_id in the trace file (it was 036c3dmx2u3x9) and executed the &lt;strong&gt;&lt;code&gt;awr_sqlid_perf_trend.sql&lt;/code&gt;&lt;/strong&gt; to find out how many disk reads were made (I removed a few columns that are not important here).&lt;/p&gt;

    &lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;awr_sqlid_perf_trend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;sql&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;036&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c3dmx2u3x9&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;001&lt;/span&gt;

 &lt;span class=&quot;n&quot;&gt;INST&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TIME&lt;/span&gt;                &lt;span class=&quot;n&quot;&gt;BUFFER_GETS_1EXEC&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;DISK_READS_1EXEC&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DIRECT_WRITES_1EXEC&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;EXECUTIONS&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ROWS_PROCESSED_1EXEC&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;----- ------------------- ----------------- ----------------- ------------------- ----------- --------------------&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2013&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;03&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;53&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;06&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1092&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;          &lt;span class=&quot;mi&quot;&gt;1073&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;                &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;           &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;                &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;It was a single execution and look at the numbers! 1073 disk reads and 1092 buffer gets. Could it be the DISK_READS_DELTA is actually the number of blocks read from disks? I need to check the raw trace file to find out.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I found the following lines in the trace file. I’ve highlighted all lines that report waits on physical IO. Notice the first query (sqlid=’96g93hntrzjtr’) is a recursive SQL (dep=1) for the query I executed (sqlid=’036c3dmx2u3x9’, and it was executed during the PARSE phase “PARSE #7904600” for my query. There were few other recursive statements, but they didn’t do any disk IOs (you’ll have to trust me here). It’s good to know the lines are written to the trace file after the corresponding event completes, this is why the recursive statements of the parse phase are reported before the line describing the whole parse operation.&lt;/p&gt;

    &lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PARSING IN CURSOR #25733316 len=210 dep=1 uid=0 oct=3 lid=0 tim=1382576068532471 hv=864012087 ad='3ecd4b88' sqlid='96g93hntrzjtr'
select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp#, sample_size, minimum, maximum, distcnt, lowval, hival, density, col#, spare1, spare2, avgcln from hist_head$ where obj#=:1 and intcol#=:2
END OF STMT
PARSE #25733316:c=0,e=240,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=3,plh=0,tim=1382576068532470
EXEC #25733316:c=0,e=404,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=3,plh=2239883476,tim=1382576068532919
WAIT #25733316: nam='db file sequential read' ela= 885 file#=1 block#=64857 blocks=1 obj#=427 tim=1382576068533833
WAIT #25733316: nam='db file sequential read' ela= 996 file#=1 block#=58629 blocks=1 obj#=425 tim=1382576068534935
FETCH #25733316:c=0,e=2092,p=2,cr=3,cu=0,mis=0,r=1,dep=1,og=3,plh=2239883476,tim=1382576068535022
STAT #25733316 id=1 cnt=1 pid=0 pos=1 obj=425 op='TABLE ACCESS BY INDEX ROWID HIST_HEAD$ (cr=3 pr=2 pw=0 time=2079 us)'
STAT #25733316 id=2 cnt=1 pid=1 pos=1 obj=427 op='INDEX RANGE SCAN I_HH_OBJ#_INTCOL# (cr=2 pr=1 pw=0 time=989 us)'
CLOSE #25733316:c=0,e=58,dep=1,type=3,tim=1382576068535146
=====================
PARSING IN CURSOR #7904600 len=50 dep=0 uid=0 oct=3 lid=0 tim=1382576068535413 hv=4197257129 ad='3618a2a4' sqlid='036c3dmx2u3x9'
select /*+ full(a) */ count(I_DATA) from tpcc.item
END OF STMT
PARSE #7904600:c=8001,e=12985,p=2,cr=19,cu=0,mis=1,r=0,dep=0,og=1,plh=1537583476,tim=1382576068535411
EXEC #7904600:c=0,e=29,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=1537583476,tim=1382576068535500
WAIT #7904600: nam='SQL*Net message to client' ela= 3 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1382576068535530
WAIT #7904600: nam='db file sequential read' ela= 1960 file#=4 block#=113050 blocks=1 obj#=65019 tim=1382576068537566
WAIT #7904600: nam='direct path read' ela= 1203 file number=4 first dba=113051 block cnt=5 obj#=65019 tim=1382576068539309
WAIT #7904600: nam='direct path read' ela= 1531 file number=4 first dba=123392 block cnt=8 obj#=65019 tim=1382576068541567
WAIT #7904600: nam='direct path read' ela= 1047 file number=4 first dba=123401 block cnt=15 obj#=65019 tim=1382576068542719
WAIT #7904600: nam='direct path read' ela= 1081 file number=4 first dba=123417 block cnt=15 obj#=65019 tim=1382576068543895
WAIT #7904600: nam='direct path read' ela= 956 file number=4 first dba=123433 block cnt=15 obj#=65019 tim=1382576068544997
WAIT #7904600: nam='direct path read' ela= 950 file number=4 first dba=123449 block cnt=15 obj#=65019 tim=1382576068546096
WAIT #7904600: nam='direct path read' ela= 1168 file number=4 first dba=123465 block cnt=15 obj#=65019 tim=1382576068547425
WAIT #7904600: nam='direct path read' ela= 1151 file number=4 first dba=123481 block cnt=15 obj#=65019 tim=1382576068548784
WAIT #7904600: nam='direct path read' ela= 1279 file number=4 first dba=123497 block cnt=15 obj#=65019 tim=1382576068550229
WAIT #7904600: nam='direct path read' ela= 9481 file number=4 first dba=123522 block cnt=126 obj#=65019 tim=1382576068559912
WAIT #7904600: nam='direct path read' ela= 6872 file number=4 first dba=123650 block cnt=126 obj#=65019 tim=1382576068566997
WAIT #7904600: nam='direct path read' ela= 5562 file number=4 first dba=123778 block cnt=126 obj#=65019 tim=1382576068573516
WAIT #7904600: nam='direct path read' ela= 7524 file number=4 first dba=123906 block cnt=126 obj#=65019 tim=1382576068582195
WAIT #7904600: nam='direct path read' ela= 5858 file number=4 first dba=124034 block cnt=126 obj#=65019 tim=1382576068589263
WAIT #7904600: nam='direct path read' ela= 5326 file number=4 first dba=124162 block cnt=126 obj#=65019 tim=1382576068595750
WAIT #7904600: nam='direct path read' ela= 5788 file number=4 first dba=124290 block cnt=126 obj#=65019 tim=1382576068602627
WAIT #7904600: nam='direct path read' ela= 2446 file number=4 first dba=124418 block cnt=70 obj#=65019 tim=1382576068607337
FETCH #7904600:c=4000,e=73444,p=1071,cr=1073,cu=0,mis=0,r=1,dep=0,og=1,plh=1537583476,tim=1382576068608996
STAT #7904600 id=1 cnt=1 pid=0 pos=1 obj=0 op='SORT AGGREGATE (cr=1073 pr=1071 pw=0 time=73444 us)'
STAT #7904600 id=2 cnt=100000 pid=1 pos=1 obj=65019 op='TABLE ACCESS FULL ITEM (cr=1073 pr=1071 pw=0 time=49672 us cost=198 size=3900000 card=100000)'
WAIT #7904600: nam='SQL*Net message from client' ela= 148 driver id=1650815232 #bytes=1 p3=0 obj#=65019 tim=1382576068609235
FETCH #7904600:c=0,e=1,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,plh=1537583476,tim=1382576068609261
WAIT #7904600: nam='SQL*Net message to client' ela= 1 driver id=1650815232 #bytes=1 p3=0 obj#=65019 tim=1382576068609276
WAIT #7904600: nam='SQL*Net message from client' ela= 940 driver id=1650815232 #bytes=1 p3=0 obj#=65019 tim=1382576068610226
CLOSE #7904600:c=0,e=17,dep=0,type=0,tim=1382576087713173
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The next task was to count the “blocks” for db file sequential reads and “block cnt” for direct path reads. The recursive SQL (96g93hntrzjtr) read 2 data blocks from disks and the main SQL (036c3dmx2u3x9) read 1071 data blocks from disks. The total number is 1073! Hey, this is exactly what DISK_READS_DELTA (DISK_READS_1EXEC in the script outputs above) reported - so &lt;strong&gt;it’s the number of data blocks&lt;/strong&gt;, and not the number of IO requests!&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The investigation resulted in two obvious conclusions:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;DISK_READS_TOTAL and DISK_READS_DELTA in DBA_HIST_SQLSTAT report the number of blocks read from disks.&lt;/li&gt;
  &lt;li&gt;The query statistics in DBA_HIST_SQLSTAT also include the data from execution of the recursive statements.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;P.S. Later I found another column - DBA_HIST_SQLSTAT.PHYSICAL_READ_REQUESTS_DELTA - that was introduced in 11.2 along with a large number of additional columns. PHYSICAL_READ_REQUESTS_DELTA and PHYSICAL_READ_REQUESTS_TOTAL represent the number of IO requests that were executed. You can compare the numbers by counting the highlighted rows above to the value I found in DBA_HIST_SQLSTAT below.&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DISK_READS_DELTA&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;PHYSICAL_READ_REQUESTS_DELTA&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dba_hist_sqlstat&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql_id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'036c3dmx2u3x9'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;DISK_READS_DELTA&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;PHYSICAL_READ_REQUESTS_DELTA&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;---------------- ----------------------------&lt;/span&gt;
            &lt;span class=&quot;mi&quot;&gt;1073&lt;/span&gt;                           &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Performance" />
      
        <category term="Internals" />
      

      
        <category term="awr" />
      
        <category term="dba_hist_sqlstat" />
      
        <category term="disk reads" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog This post relates to my previous writing on mining the AWR. I noticed that it’s very easy to misinterpret the DISK_READS_TOTAL and DISK_READS_DELTA columns in DBA_HIST_SQLSTAT. Let’s see what the documentation says: DISK_READS_TOTAL - Cumulative number of disk reads for this child cursor DISK_READS_DELTA - Delta number of disk reads for this child cursor You might think it’s clear enough and that’s exactly what I thought too. The number of disk reads is the number of IO requests to the storage. But is it really true?</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">There’s Always Another Bug Hiding Just Around the Corner</title>
      
      
      <link href="https://me-dba.com/posts/theres-always-another-bug-hiding-just-around-the-corner.html" rel="alternate" type="text/html" title="There's Always Another Bug Hiding Just Around the Corner" />
      
      <published>2013-08-15T04:01:51-05:00</published>
      <updated>2013-08-15T04:01:51-05:00</updated>
      <id>https://me-dba.com/posts/theres-always-another-bug-hiding-just-around-the-corner</id>
      <content type="html" xml:base="https://me-dba.com/posts/theres-always-another-bug-hiding-just-around-the-corner.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;http://www.pythian.com/blog/theres-always-another-bug-hiding-just-around-the-corner/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We were using a 10.2.0.3 database, and it had been running without any issues for several years. What could possibly go wrong? Anything! Suddenly, we started getting &lt;code class=&quot;highlighter-rouge&quot;&gt;ORA-07445: exception encountered: core dump [qercoStart()+156] [SIGSEGV] [Address not mapped to object]&lt;/code&gt; a few times a minute in the alert log. A closer investigation revealed that one of the popular SQLs in the application couldn’t complete anymore. It looked like a bug, since only the SQL was failing.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;We found a few references for various releases with the same conditions: &lt;code class=&quot;highlighter-rouge&quot;&gt;ORA-07445&lt;/code&gt; + &lt;code class=&quot;highlighter-rouge&quot;&gt;qercoStart()&lt;/code&gt;. This list summarizes the possible causes for the error I found on My Oracle Support:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Using ROWNUM &amp;lt; x condition in the where clause&lt;/li&gt;
  &lt;li&gt;Using ROWNUM condition and FULL OUTER joins&lt;/li&gt;
  &lt;li&gt;Using ROWNUM condition with UNION ALL set operation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The strange thing was that this started suddenly; no changes to the code were made. Moreover, the SQL didn’t contain FULL OUTER join operations or UNION ALL  set operations:&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CBMD_BASE_MDL_NUMBER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;MFG_GROUP&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MFG_ID&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;MFG_NAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;CBMD_CATALOG_MODEL_NUMBER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;CBMD_CATALOG_MODEL_SHORT_DESC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;CBMD_IMAGE_PATH&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;SUM&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CSMD_AVAILABLE_QTY&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;QTY&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CATALOG_BASE_MODEL_DATA&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;CATALOG_BASE_MODEL_CATEGORY&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;CATALOG_SUB_MODEL_DATA&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CSMD&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CBMD_BASE_MDL_NUMBER&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CSMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CBMD_BASE_MDL_NUMBER&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CBMD_BASE_MDL_NUMBER&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CBMD_BASE_MDL_NUMBER&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CSMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CSMD_AVAILABLE_FOR_SALE_FLAG&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'N'&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DC_DIVISION_CODE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CBMC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DC_DIVISION_CODE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMD_PUT_ON_WEB_FLAG&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'Y'&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CSMD_AVAIL_FOR_WEB_DISP_FLAG&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'Y'&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DC_DIVISION_CODE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;B1&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ROWNUM&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;BY&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CBMD_BASE_MDL_NUMBER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;MFG_GROUP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;MFG_NAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;CBMD_CATALOG_MODEL_NUMBER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;CBMD_CATALOG_MODEL_SHORT_DESC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;CBMD_IMAGE_PATH&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;CBMD_IMAGE_NAME&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;BY&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;QTY&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;DESC&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We also tried all the possible workarounds listed in the bug descriptions, but nothing helped:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Flushed the shared pool&lt;/li&gt;
  &lt;li&gt;setting &lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;_complex_view_merging&quot;=false&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;bouncing the database&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As raising a SR for our 10.2.0.3 DB was unlikely to help, I decided to dig deeper. I knew something had changed, and that change was what triggered the bug.  I didn’t know where to start, so I decided to look more closely in the bug descriptions in My Oracle Support. All the bugs listed examples of SQL statements containing “ROWNUM &amp;lt; X” condition. The second similarity was harder to notice. Here are some examples - I’ve highlighted the interesting lines:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;from bug 7704557 on 10.2.0.4&lt;/p&gt;

    &lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jsp1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jsp1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'SYSJCS'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;jcs_scheduler_parameters&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jsp1&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jsp1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'database_name'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'global_names'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'scheduler_hostname'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'remote_start_port'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'scheduler_connect_string'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'oracle_sid'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'listener_port'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'remote_http_output'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'remote_http_port'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scheduler_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nvl&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scheduler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scheduler_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;from bug 7528596 on 10.2.0.3&lt;/p&gt;

    &lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/*+ FIRST_ROWS(200) */&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;STATUS_NAME&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;H_STATUS_ID&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DESCRIPTION&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;H_DESCRIPTION&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PRIORITY_MEANING&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;H_PRIORITY_CODE&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CREATED_BY_NAME&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;H_CREATED_BY&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CREATED_BY_EMAIL&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;H_CREATED_BY_E&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;H_CREATED_BY_N&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CREATION_DATE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;H_CREATION_DATE&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ASSIGNED_TO_NAME&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;H_ASSIGNED_TO_USER_ID&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ASSIGNED_TO_EMAIL&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;H_ASSIGNED_TO_USER_ID_E&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ASSIGNED_TO_USERNAME&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;H_ASSIGNED_TO_USER_ID_N&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REQUEST_ID&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;H_REQUEST_ID&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;itgadm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kcrt_requests_v&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;itgadm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kcrt_req_header_details&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rh&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;batch_number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;batch_number&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REQUEST_TYPE_ID&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;30593&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REQUEST_TYPE_ID&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;30593&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;STATUS_CODE&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;LIKE&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'CLOSED%'&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;STATUS_CODE&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;LIKE&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'CANCEL%'&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;exists&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/*+ NO_UNNEST */&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pcv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REQUEST_ID&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;itgadm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;KCRT_PARTICIPANT_CHECK_V&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pcv&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pcv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;request_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;request_id&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pcv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30481&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rh&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;request_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;request_id&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rh&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PARAMETER22&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30481&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ASSIGNED_TO_USER_ID&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30481&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ROWNUM&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;200&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;BY&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REQUEST_ID&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;DESC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;from bug 7416171 on 10.2.0.3&lt;/p&gt;

    &lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;COUNT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DECODE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;COUNT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;isStemData&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ccd2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vw_policy_admins&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;q&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;system_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;system_id&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;policy_no&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;policy_no&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;policy_admin_id&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;440502405&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;440502499&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isStemData&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ccd2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vw_ordf_partners_cnt&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PARTNER_ID&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;36977489&lt;/span&gt;
  &lt;span class=&quot;cm&quot;&gt;/*AND a.PARTNER_ID2 = a.PARTNER_ID */&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ORDF_ID&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;isStemData&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;from bug 3211315 on 9.2.0.4&lt;/p&gt;

    &lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dummy&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dummy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;FULL&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;OUTER&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;JOIN&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dummy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;using&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dummy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first 3 SQLs contain “IN” or “OR” operators, and the last one contains a FULL OUTER JOIN set operation that was said to have issues. Knowing a bit of theory helped me identify some similarities:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Oracle introduced native FULL OUTER JOIN operation in 10.2.0.5. Before that, it was implemented using the UNION ALL operation. (Cristian Antognini explains it &lt;a href=&quot;http://www.antognini.ch/2010/05/native-full-outer-join-officially-available-in-10-2-0-5/&quot;&gt;here&lt;/a&gt; and gives some examples.)&lt;/li&gt;
  &lt;li&gt;“OR” and “IN” predicates can sometimes be optimized by applying the “OR Expansion” transformation, which acquires the result set of each disjunction condition separately and then combines them using the set operations, i.e. UNION ALL. (Maria Colgan explains it &lt;a href=&quot;https://blogs.oracle.com/optimizer/entry/or_expansion_transformation&quot;&gt;here&lt;/a&gt; better than anyone else could.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At that moment, I started suspecting this could be our case too because the SQL had an “OR” predicate. It was easy to check and confirm by looking at the execution plan. The highlighted line contained the CONCATENATION operation, which is the same as UNION ALL:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------------------------
Plan hash value: 132832423

--------------------------------------------------------------------------------------------------------------
| Id  | Operation                          | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT                   |                         |   434 | 69874 |    61   (4)| 00:00:01 |
|   1 |  SORT ORDER BY                     |                         |   434 | 69874 |    61   (4)| 00:00:01 |
|   2 |   HASH GROUP BY                    |                         |   434 | 69874 |            |          |
|*  3 |    COUNT STOPKEY                   |                         |       |       |            |          |
|   4 |     CONCATENATION                  |                         |       |       |            |          |
|*  5 |      FILTER                        |                         |       |       |            |          |
|   6 |       NESTED LOOPS                 |                         |     1 |   161 |    30   (0)| 00:00:01 |
|   7 |        NESTED LOOPS                |                         |     7 |  1008 |    23   (0)| 00:00:01 |
|*  8 |         TABLE ACCESS FULL          | CATALOG_SUB_MODEL_DATA  |    21 |   420 |     2   (0)| 00:00:01 |
|*  9 |         TABLE ACCESS BY INDEX ROWID| CATALOG_BASE_MODEL_DATA |     1 |   124 |     1   (0)| 00:00:01 |
|* 10 |          INDEX UNIQUE SCAN         | CBMD_C1_1_PK            |     1 |       |     0   (0)| 00:00:01 |
|* 11 |        INDEX RANGE SCAN            | CBMC_C1_1_PK            |     1 |    17 |     1   (0)| 00:00:01 |
|* 12 |      FILTER                        |                         |       |       |            |          |
|  13 |       NESTED LOOPS                 |                         |     2 |   322 |    29   (0)| 00:00:01 |
|  14 |        NESTED LOOPS                |                         |     7 |  1008 |    22   (0)| 00:00:01 |
|* 15 |         TABLE ACCESS FULL          | CATALOG_SUB_MODEL_DATA  |    20 |   400 |     2   (0)| 00:00:01 |
|* 16 |         TABLE ACCESS BY INDEX ROWID| CATALOG_BASE_MODEL_DATA |     1 |   124 |     1   (0)| 00:00:01 |
|* 17 |          INDEX UNIQUE SCAN         | CBMD_C1_1_PK            |     1 |       |     0   (0)| 00:00:01 |
|* 18 |        INDEX RANGE SCAN            | CBMC_C1_1_PK            |     1 |    17 |     1   (0)| 00:00:01 |
--------------------------------------------------------------------------------------------------------------
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A quick Google search gave me a NO_EXPAND hint, which disables the OR expansion. However, I couldn’t use it since it required a code change. I knew that the behavior of the optimizer was controlled by a large number of hidden parameters that are also listed in the 10053 trace:&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;ALTER&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;SESSION&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EVENTS&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'10053 trace name context forever,level 1'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;Session&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;altered&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;alter&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;session&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tracefile_identifier&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CR758708_2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;Session&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;altered&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;alter&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;session&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;max_dump_file_size&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;unlimited&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;Session&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;altered&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;explain&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;plan&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CBMD_BASE_MDL_NUMBER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;cm&quot;&gt;/*removed some lines for readability*/&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Explained&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Disconnected&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Oracle&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;Database&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;g&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Enterprise&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Edition&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Release&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bit&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Production&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;With&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Partitioning&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OLAP&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;Data&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Mining&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;options&lt;/span&gt;

&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;more&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;test_ora_17805_CR758708_2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;trc&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*removed some lines for readability*/&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;***************************************&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;PARAMETERS&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;USED&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;BY&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;THE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OPTIMIZER&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;********************************&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
 &lt;span class=&quot;o&quot;&gt;*************************************&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;PARAMETERS&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;WITH&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;DEFAULT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;VALUES&lt;/span&gt;
 &lt;span class=&quot;o&quot;&gt;******************************&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;_fast_full_scan_enabled&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;true&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;_optim_enhance_nnull_detection&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;true&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;_parallel_broadcast_enabled&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;true&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;_px_broadcast_fudge_factor&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;_ordered_nested_loop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;true&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;_no_or_expansion&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;false&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;optimizer_index_cost_adj&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;optimizer_index_caching&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;_system_index_caching&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;_disable_datalayer_sampling&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;false&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I disabled the OR expansion by setting the parameter &lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;_no_or_expansion&quot; = true&lt;/code&gt;, checked the execution plan, and confirmed that the query transformation didn’t happen:&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;PLAN_TABLE_OUTPUT&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-----------------------------------------------------------------------------------------------------&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Plan&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hash&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1045847658&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;-----------------------------------------------------------------------------------------------------&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Id&lt;/span&gt;  &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;Operation&lt;/span&gt;                 &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Name&lt;/span&gt;                    &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;Rows&lt;/span&gt;  &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Bytes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Cost&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CPU&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Time&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-----------------------------------------------------------------------------------------------------&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;STATEMENT&lt;/span&gt;          &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;                         &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;     &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;644&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;324&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;04&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;SORT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;BY&lt;/span&gt;            &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;                         &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;     &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;644&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;324&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;04&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;n&quot;&gt;HASH&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;BY&lt;/span&gt;           &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;                         &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;     &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;644&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;324&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;04&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|*&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;COUNT&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;STOPKEY&lt;/span&gt;          &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;                         &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;            &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;          &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|*&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;HASH&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;JOIN&lt;/span&gt;             &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;                         &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;434&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;69874&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;322&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;04&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|*&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;      &lt;span class=&quot;k&quot;&gt;TABLE&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;ACCESS&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;FULL&lt;/span&gt;    &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CATALOG_SUB_MODEL_DATA&lt;/span&gt;  &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;3777&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;75540&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;mi&quot;&gt;62&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;01&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|*&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;      &lt;span class=&quot;n&quot;&gt;HASH&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;JOIN&lt;/span&gt;            &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;                         &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;3087&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;425&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;K&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;260&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;04&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|*&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;       &lt;span class=&quot;k&quot;&gt;INDEX&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FAST&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;FULL&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SCAN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CBMC_C1_1_PK&lt;/span&gt;            &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;1759&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;29903&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;01&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;|*&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;       &lt;span class=&quot;k&quot;&gt;TABLE&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;ACCESS&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;FULL&lt;/span&gt;   &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CATALOG_BASE_MODEL_DATA&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;mi&quot;&gt;2685&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;325&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;K&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;mi&quot;&gt;247&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;03&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-----------------------------------------------------------------------------------------------------&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;Predicate&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Information&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;identified&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;operation&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;---------------------------------------------------&lt;/span&gt;

   &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ROWNUM&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;access&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CBMD'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CBMD_BASE_MDL_NUMBER'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CSMD'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CBMD_BASE_MDL_NUMBER'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;n&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CSMD'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CSMD_AVAILABLE_FOR_SALE_FLAG'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'N'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'CBMC'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'DC_DIVISION_CODE'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt;
              &lt;span class=&quot;s1&quot;&gt;'CBMC'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'DC_DIVISION_CODE'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CSMD_AVAIL_FOR_WEB_DISP_FLAG'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Y'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;access&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CBMD'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CBMD_BASE_MDL_NUMBER'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CBMC'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CBMD_BASE_MDL_NUMBER'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CBMC'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'DC_DIVISION_CODE'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'CBMC'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'DC_DIVISION_CODE'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt;
              &lt;span class=&quot;s1&quot;&gt;'CBMC'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'DC_DIVISION_CODE'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TO_NUMBER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;B1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
   &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'CBMD_PUT_ON_WEB_FLAG'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Y'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In our case, the optimizer had changed the execution plan after fresh statistics were collected - this was the change that triggered the bug. We set the parameter to disable the OR expansion until we upgrade to 11.2.&lt;/p&gt;

&lt;p&gt;I wanted to share this story with you because it’s interesting how different things (IN and OR predicates, UNION ALL and FULL OUTER JOIN set operations, etc.) transform behind the scenes into the same conditions to trigger the same bug. I think this incident has also changed the way I’ll read bug descriptions on My Oracle Support in the future - there is information hidden between the lines.&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Bugs" />
      
        <category term="Troubleshooting" />
      
        <category term="Internals" />
      

      

      
        <summary type="html">This blog post was originally released on Pythian blog We were using a 10.2.0.3 database, and it had been running without any issues for several years. What could possibly go wrong? Anything! Suddenly, we started getting ORA-07445: exception encountered: core dump [qercoStart()+156] [SIGSEGV] [Address not mapped to object] a few times a minute in the alert log. A closer investigation revealed that one of the popular SQLs in the application couldn’t complete anymore. It looked like a bug, since only the SQL was failing.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Be Warned: cmclean.sql is Dangerous!</title>
      
      
      <link href="https://me-dba.com/posts/be-warned-cmclean-sql-is-dangerous.html" rel="alternate" type="text/html" title="Be Warned: cmclean.sql is Dangerous!" />
      
      <published>2013-07-18T12:53:06-05:00</published>
      <updated>2013-07-18T12:53:06-05:00</updated>
      <id>https://me-dba.com/posts/be-warned-cmclean-sql-is-dangerous</id>
      <content type="html" xml:base="https://me-dba.com/posts/be-warned-cmclean-sql-is-dangerous.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;http://www.pythian.com/blog/be-warned-cmclean-sql-is-dangerous/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m sure one of the most popular scripts for Apps DBAs on My Oracle Support is &lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt; from MOS Article ID 134007.1 “Concurrent Processing - CMCLEAN.SQL - Non Destructive Script to Clean Concurrent Manager Tables”. DBAs usually use the script to clean up stale data from concurrent processing tables (FND_CONCURRENT_%) after incidents like a crash of the database or concurrent processing node. This script sets correct completion phase and status codes for terminated concurrent requests and sets correct control codes for terminated concurrent manager processes. Despite the assuring “Non Destructive” claim in the title of the MOS Article there is a possibility to lose concurrent request schedules when &lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt; is executed.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;First of all it’s important to understand how scheduled concurrent requests are executed and resubmitted. A simplified process of the execution is:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Concurrent manager process (e.g. FNDLIBR in case of Standard Manager) queries the FND_CONCURRENT_REQUESTS table for pending requests.&lt;/li&gt;
  &lt;li&gt;When a pending request is found, the manager process updates the PHASE_CODE=R (Running) and STATUS_CODE=R (Running).&lt;/li&gt;
  &lt;li&gt;The next step is to start the executable of the concurrent program. If it’s a PL/SQL procedure – FNDLIBR  connects to the DB and executes the PL/SQL code, if it’s a java program – FNDLIBR starts up a java process to execute the java class, etc.&lt;/li&gt;
  &lt;li&gt;FNDLIBR catches the exit codes from the executable of the concurrent program and updates the statuses in FND_CONCURRENT_REQUESTS accordingly - PHASE_CODE=C (Completed) and STATUS_CODE = C (Normal), G (Warning) or E (Error).&lt;/li&gt;
  &lt;li&gt;FNDLIBR checks if the concurrent request has a schedule and needs to be resubmitted. If yes – it resubmits a new concurrent request with the same parameters.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But what happens if the FNDLIBR process crashes, terminates or gets killed while it’s running a concurrent request? Who takes care of the statuses in FND_CONCURRENT_REQUESTS table and how the request is resubmitted if the concurrent manager process is not there anymore?&lt;/p&gt;

&lt;p&gt;It appears the Internal Concurrent Manager (ICM) takes care of these tasks. It checks the running requests periodically (every two minutes by default) and if it finds any that’s missing the concurrent manager process and the DB session, it updates the statuses for the concurrent request and also resubmits it if it has a schedule. This action is followed by a log entry in the ICM log file:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;                   Process monitor session started : 17-JUL-2013 04:24:24

Found running request 5829148 attached to dead manager process.
Setting request status to completed.

Found dead process: spid=(15160), cpid=(2032540), ORA pid=(35), manager=(0/0)

Starting STANDARD Concurrent Manager               : 17-JUL-2013 04:24:25

                     Process monitor session ended : 17-JUL-2013 04:24:25
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Interesting to note, if the Internal Concurrent Manager is terminated at the same time with the manager process and is restarted later by the reviver process or by running “adcmctl.sh start” manually, the ICM performs the same check of running requests as part of the startup sequence, but this time it &lt;strong&gt;restarts&lt;/strong&gt; the request instead of terminating and resubmitting it. The log of the ICM contains the following lines:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Found running request 5829146 attached to dead manager process.
Attempting to restart request.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The concurrent request is started again with exactly the same request_id as previous time when it was terminated, also the log file of the request will contain information from 2 executions – the first, which didn’t complete and then the secon which probably completed. I think this scenario is very confusing and instead of restarting the request it should better be terminated and a new one should be submitted.&lt;/p&gt;

&lt;p&gt;Let’s get back to the problem with &lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt;! The worst thing that can be done is running &lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt; after crash of the concurrent processing node before starting up the concurrent managers. Why? Because &lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt; cleans up data in FND_CONCURRENT_REQUESTS by executing one simple update statement to change the phase and status of any “Running” or “Terminating” request to “Completed/Error”:&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;UPDATE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fnd_concurrent_requests&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;SET&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;phase_code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'C'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;status_code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'E'&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;status_code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'T'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;phase_code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'R'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt; does not resubmit the request if it has a schedule.&lt;/strong&gt; Execute it and you risk to lose some scheduled programs without any warning.&lt;/p&gt;

&lt;p&gt;Similarly – never run &lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt; if you stopped the concurrent managers using “adcmctl.sh abort” or “kill -9” on concurrent manager processes to speed up the shutdown procedure. There’s the same risk to lose some scheduled requests.&lt;/p&gt;

&lt;p&gt;Despite the risks, &lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt; is still a useful tool &lt;strong&gt;in case concurrent managers don’t come up after a failure or there are some stale data that is otherwise not cleaned up&lt;/strong&gt;. But please, be careful when you run it! Check closely the list of requests reported in the following section of the outputs from &lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt;, because &lt;strong&gt;these requests have to be resubmitted manually if they had schedules&lt;/strong&gt;.&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;-- Updating any Running or Terminating requests to Completed/Error

Request ID Phase  Status
---------- ------ ------
6607       R      W
6700       R      W
893534056  R      R

3 rows updated.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;concurrent-manager-recovery-wizard-is-even-worse-added-on-jul-21-2013&quot;&gt;“Concurrent Manager Recovery” wizard is even worse! (Added on Jul 21, 2013)&lt;/h3&gt;

&lt;p&gt;After posting this article I started thinking if the “Concurrent Manager Recovery” Wizard available from Oracle Applications Manager in e-Business Suite was any better then cmclean.sql. As I didn’t have much experience with it I decided to give it a try. This is what I did:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Scheduled 2 concurrent programs (“CP Java Regression Test” and “CP PLSQL Regression Test”) to restart in 1 minute after the previous execution completes. These are simple test concurrent programs which sleep for some time and then complete.&lt;/li&gt;
  &lt;li&gt;I made sure both of the programs were running and terminated all concurrent manager process and DB sessions for these concurrent programs.&lt;/li&gt;
  &lt;li&gt;Termination of the processes and sessions left the rows in FND_CONCURRENT_REQUESTS with PHASE_CODE=R and STATUS_CODE=R&lt;/li&gt;
  &lt;li&gt;I executed the “Concurrent Manager Recovery” wizard which fixed the status codes of the concurrent manager processes, but didn’t touch the statuses of the concurrent requests - I thought this was a good thing (I expected the ICM would clean up the statuses and would resubmit the requests at it’s startup phase)&lt;/li&gt;
  &lt;li&gt;I started up the concurrent managers, but ICM didn’t clean up the 2 stale records in FND_CONCURRENT_REQUESTS table. The 2 requests appeared as they would be running, while in fact they didn’t have any OS processes or DB sessions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I didn’t have much time to look into the details, but it looks like the ICM is only cleaning up requests attached to dead managers (“Active” status in the FND_CONCURRENT_PROCESSES table and no OS processes running), but here the Wizard updated the statuses of the manager processes as if they completed normally so the ICM couldn’t identify them as being “dead”.&lt;/p&gt;

&lt;p&gt;This actually means the “Concurrent Manager Recovery” wizard can cause serious issues too - it doesn’t clear up the concurrent_request statuses and it prevents ICM from doing it too, so once we start up the system the terminated requests appear as if they were running. And because of this, the Conflict Resolution Manager might prevent execution of some other programs with the incompatibility rules against the terminated requests. You will need to stop the managers and run cmclean.sql to fix the statuses (and loose the schedules) to get out of this situation.&lt;/p&gt;

&lt;h3 id=&quot;so-what-should-we-do-to-clean-up-the-concurrent-processing-tables-after-crashes-or-cloning-added-on-jul-21-2013&quot;&gt;So what should we do to clean up the concurrent processing tables after crashes or cloning? (Added on Jul 21, 2013)&lt;/h3&gt;

&lt;p&gt;It appears to me there is no reliable way to clean up the tables properly. The cmclean.sql can remove some schedules without warning. The “Concurrent Manager Recovery” wizard may leave some requests in the running state even if they were terminated.&lt;/p&gt;

&lt;p&gt;I’m going to open a SR for Oracle to request a proper solution, but meanwhile I’d suggest to use the cmclean.sql, but make sure to check it’s outputs carefully and reschedule any requests which got cleaned up (as described above).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S. The description of the behavior of ICM in this blog post is a result of investigation performed on R12.1.3. I believe it behaves the same way in R12.1 and probably even in R12.0 and 11i, but I didn’t check. MOS Article ID 134007.1 which contains the &lt;code class=&quot;highlighter-rouge&quot;&gt;cmclean.sql&lt;/code&gt; script is valid for Applications versions 10.7 to 12.1.3 – be careful with it independently of the version of your e-Business Suite installation.&lt;/em&gt;&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Performance" />
      
        <category term="Concurrent Processing" />
      
        <category term="Tools" />
      

      
        <category term="cmclean.sql" />
      
        <category term="concurrent managers" />
      
        <category term="concurrent requests" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog I’m sure one of the most popular scripts for Apps DBAs on My Oracle Support is cmclean.sql from MOS Article ID 134007.1 “Concurrent Processing - CMCLEAN.SQL - Non Destructive Script to Clean Concurrent Manager Tables”. DBAs usually use the script to clean up stale data from concurrent processing tables (FND_CONCURRENT_%) after incidents like a crash of the database or concurrent processing node. This script sets correct completion phase and status codes for terminated concurrent requests and sets correct control codes for terminated concurrent manager processes. Despite the assuring “Non Destructive” claim in the title of the MOS Article there is a possibility to lose concurrent request schedules when cmclean.sql is executed.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Performance Settings of Concurrent Managers</title>
      
      
      <link href="https://me-dba.com/posts/performance-settings-of-concurrent-managers.html" rel="alternate" type="text/html" title="Performance Settings of Concurrent Managers" />
      
      <published>2013-04-30T07:52:45-05:00</published>
      <updated>2013-04-30T07:52:45-05:00</updated>
      <id>https://me-dba.com/posts/performance-settings-of-concurrent-managers</id>
      <content type="html" xml:base="https://me-dba.com/posts/performance-settings-of-concurrent-managers.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/performance-settings-of-concurrent-managers/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the second article in a series about internals and performance of concurrent managers. In this post, we’ll take a look at three important settings that affect the performance of the concurrent managers: &lt;strong&gt;number of processes, “sleep seconds”, and “cache size”&lt;/strong&gt;.  This article might be a bit on the theoretical side, but it should provide a good understanding of how these settings actually affect the behavior and performance of concurrent managers. Most of the statements in this article build off of information from my previous post:  &lt;a href=&quot;2013/03/the-internal-workflow-of-e-business-suite-concurrent-manager-process.html&quot;&gt;The Internal Workflow of e-Business Suite Concurrent Manager Process&lt;/a&gt;. It may be helpful to take a look at it before continuing with this one.&lt;/p&gt;

&lt;h3 id=&quot;life-cycle-of-a-concurrent-request&quot;&gt;Life cycle of a Concurrent Request&lt;/h3&gt;

&lt;p&gt;The interesting thing about tuning concurrent managers is the fact that we don’t tune a particular query or a running process, but we actually tune the pending time of concurrent requests. The goal of the tuning is to make sure concurrent requests start executing &lt;em&gt;soon enough&lt;/em&gt; after the time they have been scheduled for. Let’s take a look at &lt;strong&gt;the life cycle of a concurrent request&lt;/strong&gt;:&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/lifecycle-of-a-cr.png&quot;&gt;&lt;img alt=&quot;The Life cycle of a Concurrent Request (CR)&quot; src=&quot;/images/lifecycle-of-a-cr.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;The Life cycle of a Concurrent Request (CR)&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;Based on the diagram above, the pending time of the request is the interval between the time the request was scheduled to start and the time it actually started. This time can be split in two parts:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Pending for Conflict Resolution Manager (CRM) - Here the CRM checks the incompatibility rules effective for the pending concurrent request against other running requests. The CRM allows the request to execute only when all incompatible requests have completed.&lt;/li&gt;
  &lt;li&gt;Pending for Concurrent Manager (CM) - This is the time spent waiting for an available concurrent manager process. It also includes the time the CM process takes to fetch the request from FND_CONCURRENT_REQUESTS table and to start executing it. &lt;strong&gt;“Pending for CM” is the interval that can be tuned by altering the number of manager processes, “sleep seconds” and the “cache size” settings&lt;/strong&gt;.&lt;!--more--&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;requirements&quot;&gt;Requirements&lt;/h3&gt;

&lt;p&gt;Understanding the requirements is a mandatory step for any tuning attempt. Otherwise, it’s hard to know when to stop tuning as can become unclear if the performance is sufficient or not. When you’re tuning concurrent managers the requirements can be defined by answering a simple question: &lt;strong&gt;How long is the request allowed to stay pending after the scheduled start?&lt;/strong&gt; You should also keep in mind the following items while thinking about the answer:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Be realistic&lt;/strong&gt; - “Requests should start immediately” is not a valid answer. It’s simply not possible because of how concurrent managers work. If there is anything you have to run immediately - concurrent programs are not the correct way of doing it.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Think of groups of concurrent programs&lt;/strong&gt; - If you have a similar requirements for a group of requests (i.e. a program printing invoices while the customer is waiting on-site should start executing in 10 seconds after it’s submitted), a dedicated concurrent manager should be implemented for them.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Unsure of requirements?&lt;/strong&gt; - If the requirements are not known, ask the end users if they have experienced situations when requests stay in the queue for too long. Was it because the managers couldn’t cope with the amount of incoming requests? If so, the settings might be too low.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Work Shifts&lt;/strong&gt; - If the requirements differ at different times of the day, concurrent manager Work Shifts can be used to define different settings depending on the time of the day.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;settings&quot;&gt;Settings&lt;/h3&gt;

&lt;p&gt;The settings related to concurrent managers are explained in the documentation: &lt;a href=&quot;http://docs.oracle.com/cd/E18727_01/doc.121/e12893/T174296T174302.htm&quot;&gt;Oracle E-Business Suite System Administrator’s Guide - Configuration&lt;/a&gt;. But I find the explanations are too often unclear to effectively tune the concurrent managers. In this chapter I’ll reveal the basic principles behind each of the three main settings and will describe how I utilize them to control the performance of concurrent managers.&lt;/p&gt;

&lt;h4 id=&quot;number-of-processes&quot;&gt;Number of Processes&lt;/h4&gt;

&lt;p&gt;From the Documentation: “&lt;em&gt;The number of operating system processes you want your work shift to run simultaneously. Each process can run a concurrent request.&lt;/em&gt;”&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It’s important to add that there is &lt;strong&gt;no coordination between processes&lt;/strong&gt; of a concurrent manager. If all concurrent processes fetched from the FND_CONCURRENT_REQUESTS table at exactly the same time - they all would read exactly the same information about pending requests. A simple mechanism of row locking is utilized later to allow execution of a concurrent request on a single manager process.&lt;/li&gt;
  &lt;li&gt;Choosing the correct number of concurrent processes is not easy as the workloads are not constant and the number of pending requests can vary. Here are some clues you should consider (I’m also planning a future blog post about measuring the actual utilization levels of concurrent managers):
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Don’t configure too many processes!&lt;/strong&gt; Your hardware is limited. If you configure too many processes you’ll exhaust the server resources. For example, if you run lots of big Oracle Reports (CPU-intensive workload) and you have 4 CPUs on your only web/forms/concurrent node, configuring 8 processes for the concurrent manager is risky. If 8 reports where to be generated at the same time, the users could experience web/forms slowness. The same applies to the database tier. Additionally, if too many processes are configured they can use a significant amount of resources even when they are idle. This is especially important for RAC configurations. (This too will be explained in one of my upcoming blog posts)&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Don’t configure too few processes!&lt;/strong&gt; If the number of processes is insufficient, the requests will start queuing. If that becomes an issue, increase the number of processes slightly. Consider defining a Work Shift with a different number of processes at different times of the day to accommodate your requirements.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Don’t be afraid of queuing!&lt;/strong&gt; Queuing is normal, especially if all requests still manage to start as expected based on the requirements. If you see recurring queuing at particular times, check with the users if that is going to be a problem.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Start low!&lt;/strong&gt; If you’re unsure of what setting should be used, start with a low number of processes. Check if any queueing occurs and if the users start complaining.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;sleep-seconds&quot;&gt;Sleep Seconds&lt;/h4&gt;

&lt;p&gt;From the Documentation: “&lt;em&gt;The sleep time for your manager during this work shift. Sleep time is the number of seconds your manager waits between checking the list of pending concurrent requests (concurrent requests waiting to be started)&lt;/em&gt;”&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;The documentation is inaccurate&lt;/strong&gt; - It should clearly state that it’s &lt;strong&gt;effective for each manager process&lt;/strong&gt; - i.e. if you have 5 concurrent manager processes for the Standard Manager and the “Sleep Seconds” setting is set to 30, then the average time between checks for pending requests (if all managers are idle) is 30 / 5 = 6 seconds.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A manager process sleeps only when there are no pending requests&lt;/strong&gt; - The manager process checks the requests queue immediately after it has processed the last request it fetched. A common misconception is that if the rate of incoming requests is very high, the “Sleep Seconds” should be low to process all of them quickly. Not true! If the rate of incoming requests is high, there is a good chance some requests will be executing at any given time. So, when they complete, the requests queue will be checked immediately and the new requests will be started.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;What value to use?&lt;/strong&gt; - Calculate it! Three parameters are important to estimate the “Sleep Seconds” (&lt;strong&gt;S&lt;/strong&gt;) setting: the number of manager processes (&lt;strong&gt;N&lt;/strong&gt;), the average utilization level (&lt;strong&gt;U&lt;/strong&gt;) of concurrent managers (this setting will be explained later), and the average time of how long the request is allowed to be pending (&lt;strong&gt;T&lt;/strong&gt;). As “Sleep Seconds” are effective only for the idle processes, it can be calculated using the following: &lt;strong&gt;&lt;em&gt;S = N * (1 - U) * T&lt;/em&gt;&lt;/strong&gt;.
    &lt;ul&gt;
      &lt;li&gt;Example 1: if N = 5 processes, U= 20%, T=20 seconds - let’s calculate the “Sleep Seconds” setting: S = 5 * (1 - 0.2) * 20 = 5 * 0.8 * 20 = &lt;strong&gt;80 seconds&lt;/strong&gt;. It seems high, but think about it - if the average utilization of 5 processes is 20%, then there are 4 idle processes at any given time. Each of these will have a sleep interval of 80 seconds, so on average the requests queue will be checked every 20 seconds.&lt;/li&gt;
      &lt;li&gt;Example 2: if N = 3 processes, U= 90%, T=20 seconds: S = 3 * (1 - 0.9) * 20 = 3 * 0.1 * 20 = &lt;strong&gt;6 seconds&lt;/strong&gt;.  This example reveals a problem as the calculated “Sleep Seconds” are lower than the requirement we have set - this means the requirement can’t be reached with the number of running processes. Think about it - we have 3 processes each utilized 90% of time, it’s impossible to meet the 20 seconds goal because most of the time all managers are busy. There simply aren’t enough processes to execute the incoming requests. &lt;strong&gt;The defined requirements can be reached only if at least one manager process is idle&lt;/strong&gt; - This scenario also describes a “perfect world”, where all but one manager is busy, so all new requests are picked up in time and the processing overhead of the idle manager processes is minimal.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;cache-size&quot;&gt;Cache Size&lt;/h4&gt;

&lt;p&gt;From the Documentation: “&lt;em&gt;The number of requests your manager remembers each time it reads which requests to run&lt;/em&gt;”&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Almost useless setting&lt;/strong&gt; - Unless you have a manager with only one running process. If multiple manager processes are running, there is a good chance that most of the cached requests will be processed (remember, the processes don’t coordinate the work - they compete the work) by other manager processes while the first request is running.
    &lt;ul&gt;
      &lt;li&gt;Example, there are 10 manager processes and 10 requests are submitted. One of the manager processes starts executing the 1st request, the other managers start running the remaining requests. So, by the time the request completes all the cached requests will be obsolete, but the manager process will try to lock the corresponding rows in FND_CONCURRENT_REQUESTS table anyway, and will fail for all 9 requests. It will then immediately query the queue to check if more requests are pending.&lt;/li&gt;
      &lt;li&gt;I think it’s best to &lt;strong&gt;set “Cache Size” setting to 1&lt;/strong&gt; so the hardware resources aren’t spent on trying to lock the processed requests, but rather on checking the requests queue.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Request priorities are cached too&lt;/strong&gt; - If you have a cache size greater than 1, keep in mind the request priorities are cached too. If the priority is changed for a cached request, the manager process will not notice it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;summary&quot;&gt;Summary&lt;/h3&gt;

&lt;p&gt;I have to admit this article turned out to be much more complicated to write than I expected, even if there are just a few settings to describe. The problem is that the concurrent processing environment is changing all the time. At one moment it’s completely idle, and then suddenly there is a spike of incoming requests. It makes it impossible to tune for all situations.  There will always be instances when any configuration works better and others when it makes things worse, but I hope I was able to outline the significance of each configurable parameter so the overall picture is clearer.&lt;/p&gt;

&lt;p&gt;As I promised, two other articles are lined up for the future - one to describe the actual utilization levels of concurrent managers and the other to look into overhead of an idle concurrent processing environment. Stay tuned!&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle e-Business Suite" />
      
        <category term="Concurrent Processing" />
      
        <category term="Performance" />
      
        <category term="Internals" />
      

      
        <category term="concurrent managers" />
      
        <category term="concurrent processing" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog This is the second article in a series about internals and performance of concurrent managers. In this post, we’ll take a look at three important settings that affect the performance of the concurrent managers: number of processes, “sleep seconds”, and “cache size”. This article might be a bit on the theoretical side, but it should provide a good understanding of how these settings actually affect the behavior and performance of concurrent managers. Most of the statements in this article build off of information from my previous post: The Internal Workflow of e-Business Suite Concurrent Manager Process. It may be helpful to take a look at it before continuing with this one. Life cycle of a Concurrent Request The interesting thing about tuning concurrent managers is the fact that we don’t tune a particular query or a running process, but we actually tune the pending time of concurrent requests. The goal of the tuning is to make sure concurrent requests start executing soon enough after the time they have been scheduled for. Let’s take a look at the life cycle of a concurrent request: The Life cycle of a Concurrent Request (CR) Based on the diagram above, the pending time of the request is the interval between the time the request was scheduled to start and the time it actually started. This time can be split in two parts: Pending for Conflict Resolution Manager (CRM) - Here the CRM checks the incompatibility rules effective for the pending concurrent request against other running requests. The CRM allows the request to execute only when all incompatible requests have completed. Pending for Concurrent Manager (CM) - This is the time spent waiting for an available concurrent manager process. It also includes the time the CM process takes to fetch the request from FND_CONCURRENT_REQUESTS table and to start executing it. “Pending for CM” is the interval that can be tuned by altering the number of manager processes, “sleep seconds” and the “cache size” settings.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Which Partitions Does The SQL Statement Access?</title>
      
      
      <link href="https://me-dba.com/posts/Which-partitions-does-the-sql-statement-access.html" rel="alternate" type="text/html" title="Which Partitions Does The SQL Statement Access?" />
      
      <published>2013-04-05T08:03:50-05:00</published>
      <updated>2013-04-05T08:03:50-05:00</updated>
      <id>https://me-dba.com/posts/Which-partitions-does-the-sql-statement-access</id>
      <content type="html" xml:base="https://me-dba.com/posts/Which-partitions-does-the-sql-statement-access.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/which-partitions-does-the-sql-statement-access/&quot;&gt;Pythian blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is a short blog post on how one can prove that a particular partition of the table or index is accessed by a specific query.&lt;/p&gt;

&lt;p&gt;The solution to this question seemed interesting enough to share with you all. Here’s a short description of what I had:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A SQL with sql_id = &lt;code class=&quot;highlighter-rouge&quot;&gt;9kuvj1g38hja2&lt;/code&gt; is the TOP 1 statement in “User I/O” section of AWR report.&lt;/li&gt;
  &lt;li&gt;The statement queries data from multiple tables. One of them is a fairly large table named “ALERT”. It is range partitioned by date, and each year has it’s own partition (Y2013, Y2012, …).&lt;/li&gt;
  &lt;li&gt;The SQL takes 5 – 10 seconds to complete and is executed 500 – 5000 times each hour (sometimes even ~10 of them are running simultaneously).&lt;/li&gt;
  &lt;li&gt;~95% of elapsed time is spent on db file sequential reads.&lt;/li&gt;
  &lt;li&gt;Diagnostic pack is licensed (it is required for this method as ASH is used).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We also had a statement so that none of the queries should be reading data older then 1 year, but looking at the statistics I suspected there was something wrong. So here’s how I found out older data from the ALERT table was accessed:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;As the query is executed very often, it has many appearances in ASH.&lt;/li&gt;
  &lt;li&gt;As the statement does lots of  db file sequential reads, there are many p1 (file_id) and p2 (block_id) combinations available from ASH.&lt;/li&gt;
  &lt;li&gt;file_id and block_id can be joined to DBA_EXTENTS to find out the segment which the block belongs to. That is where the partition names being accessed by the SQL where found out.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The challenge with this approach was the fact that I had more then 100K samples for &lt;code class=&quot;highlighter-rouge&quot;&gt;9kuvj1g38hja2&lt;/code&gt; waiting on db file sequential reads in DBA_HIST_ACTIVE_SESS_HISTORY, and there were millions of extents in the database. How do I join them efficiently? I can fetch only the segments we’re interested in from DBA_EXTENTS before joining it all to DBA_HIST_ACTIVE_SESS_HISTORY (Thanks Yury for this great hint)! So this is the query that solved the mystery:&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;with&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;exts&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/*+ materialize */&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;partition_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;block_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;blocks&lt;/span&gt;
         &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dba_extents&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;owner&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'SECRET'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;segment_name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'ALERT'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;stats&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/*+ materialize */&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cnt&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DBA_HIST_ACTIVE_SESS_HISTORY&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql_id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'9kuvj1g38hja2'&lt;/span&gt;
           &lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'db file sequential read'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;group&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;partition_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;sum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cnt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;read_count&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stats&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file_id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p1&lt;/span&gt;
   &lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p2&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;between&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;block_id&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;block_id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blocks&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;group&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;partition_name&lt;/span&gt;
 &lt;span class=&quot;k&quot;&gt;order&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It’s short and simple, and it also answered the question I asked. Is old data accessed by the SQL statement? Yes.&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PARTITION_NAME                 READ_COUNT
------------------------------ ----------
Y2006                                 111
Y2007                                5645
Y2008                                5698
Y2013                               10388
Y2009                               13473
Y2010                               21600
Y2011                               37186
Y2012                               56184

 8 rows selected
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Be careful when interpreting the results! If the SQL does not report a partition as being accessed, it doesn’t mean it was not accessed. ASH is based on sampling – maybe we got “lucky” and samples didn’t cover reads from that partition? Maybe all blocks belonging to the partition were in buffer cache and no reads were needed? But, if the SQL reported a partition as being accessed, we can be 100% sure it really was, and for me that was enough.&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Troubleshooting" />
      

      
        <category term="partitioning" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog. This is a short blog post on how one can prove that a particular partition of the table or index is accessed by a specific query. The solution to this question seemed interesting enough to share with you all. Here’s a short description of what I had: A SQL with sql_id = 9kuvj1g38hja2 is the TOP 1 statement in “User I/O” section of AWR report. The statement queries data from multiple tables. One of them is a fairly large table named “ALERT”. It is range partitioned by date, and each year has it’s own partition (Y2013, Y2012, …). The SQL takes 5 – 10 seconds to complete and is executed 500 – 5000 times each hour (sometimes even ~10 of them are running simultaneously). ~95% of elapsed time is spent on db file sequential reads. Diagnostic pack is licensed (it is required for this method as ASH is used). We also had a statement so that none of the queries should be reading data older then 1 year, but looking at the statistics I suspected there was something wrong. So here’s how I found out older data from the ALERT table was accessed: As the query is executed very often, it has many appearances in ASH. As the statement does lots of db file sequential reads, there are many p1 (file_id) and p2 (block_id) combinations available from ASH. file_id and block_id can be joined to DBA_EXTENTS to find out the segment which the block belongs to. That is where the partition names being accessed by the SQL where found out. The challenge with this approach was the fact that I had more then 100K samples for 9kuvj1g38hja2 waiting on db file sequential reads in DBA_HIST_ACTIVE_SESS_HISTORY, and there were millions of extents in the database. How do I join them efficiently? I can fetch only the segments we’re interested in from DBA_EXTENTS before joining it all to DBA_HIST_ACTIVE_SESS_HISTORY (Thanks Yury for this great hint)! So this is the query that solved the mystery: with exts as (select /*+ materialize */ partition_name, file_id, block_id, blocks from dba_extents where owner='SECRET' and segment_name='ALERT'), stats as (select /*+ materialize */ p1, p2, count(*) cnt from DBA_HIST_ACTIVE_SESS_HISTORY where sql_id='9kuvj1g38hja2' and event='db file sequential read' group by p1, p2) select partition_name, sum(s.cnt) read_count from exts e, stats s where e.file_id=s.p1 and s.p2 between e.block_id and e.block_id+e.blocks-1 group by partition_name order by 2; It’s short and simple, and it also answered the question I asked. Is old data accessed by the SQL statement? Yes. PARTITION_NAME READ_COUNT ------------------------------ ---------- Y2006 111 Y2007 5645 Y2008 5698 Y2013 10388 Y2009 13473 Y2010 21600 Y2011 37186 Y2012 56184 8 rows selected Be careful when interpreting the results! If the SQL does not report a partition as being accessed, it doesn’t mean it was not accessed. ASH is based on sampling – maybe we got “lucky” and samples didn’t cover reads from that partition? Maybe all blocks belonging to the partition were in buffer cache and no reads were needed? But, if the SQL reported a partition as being accessed, we can be 100% sure it really was, and for me that was enough.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">The Internal Workflow of e-Business Suite Concurrent Manager Process</title>
      
      
      <link href="https://me-dba.com/posts/the-internal-workflow-of-e-business-suite-concurrent-manager-process.html" rel="alternate" type="text/html" title="The Internal Workflow of e-Business Suite Concurrent Manager Process" />
      
      <published>2013-03-22T06:45:06-05:00</published>
      <updated>2013-03-22T06:45:06-05:00</updated>
      <id>https://me-dba.com/posts/the-internal-workflow-of-e-business-suite-concurrent-manager-process</id>
      <content type="html" xml:base="https://me-dba.com/posts/the-internal-workflow-of-e-business-suite-concurrent-manager-process.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/the-internal-workflow-of-e-business-suite-concurrent-manager-process/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Concurrent processing is one of the key elements of any e-Business Suite system. It provides scheduling and queueing functionality for background jobs and it’s used by most of the applications modules. As many things depend on concurrent processing it’s important to make sure the configuration is tuned for your requirements and hardware specification.&lt;/p&gt;

&lt;p&gt;This is the first article in a series about performance of concurrent processing. We’ll take a closer look at the internals of concurrent managers, the settings that affect their performance and the ways of diagnosing performance and configuration issues. Today we’ll start with an overview of the internal workflow of a concurrent manager process. Enjoy the reading.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;There are few things that need to be clear before we start:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;This is only about how the concurrent processing framework (the concurrent managers) works and it’s not about the concurrent requests executed in the framework.&lt;/li&gt;
  &lt;li&gt;There are multiple types of concurrent managers in eBS - internal manager, conflict resolution manager, workflow agent listener service, standard manager, etc. Their roles are different and in this post I’ll discuss only managers that pick up scheduled concurrent requests from the “queue” and execute them - or specifically all managers that have type of “Concurrent Manager” set in Concurrent managers’ definition form. Typical examples of these managers are “Standard Manager”, “Inventory Manager” and probably your own custom concurrent managers created for processing specific types of concurrent requests.&lt;/li&gt;
&lt;/ol&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/concurrent-managers-type.png&quot;&gt;&lt;img alt=&quot;Concurrent Managers Form&quot; src=&quot;/images/concurrent-managers-type.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;Concurrent Managers Form&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;It is important to understand the internal workflow of a concurrent manager because otherwise it’s hard to realize how a configuration change actually affects the system. Several years ago I had to implement an online change of a specialization rule and it triggered a bounce of all Standard Manager processes - that’s when I realized I had to understand how it worked and since then I have spent lots of hours looking into internals of concurrent managers. I’m not saying everything is 100% clear for me now - there are too many little things that matter in certain situations. This series of posts will be more about concepts and I hope you’ll find it useful.&lt;/p&gt;

&lt;p&gt;So how does a concurrent manager process work? Here is a diagram I created to explain it:&lt;/p&gt;

&lt;center&gt;&lt;div style=&quot;min-width: 300px; width: 50%; background-color: rgb(245, 242, 240); padding: 5px; text-size-adjust: 80%; text-decoration: underline;&quot;&gt;&lt;a data-fancybox=&quot;gallery&quot; href=&quot;/images/theinternalworkflowofebusinesssuiteconcurrentmanagerprocess.png&quot;&gt;&lt;img alt=&quot;Internal workflow of a concurrent manager process&quot; src=&quot;/images/theinternalworkflowofebusinesssuiteconcurrentmanagerprocess.png&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;img_caption&quot;&gt;Internal workflow of a concurrent manager process&lt;/p&gt;&lt;/div&gt;&lt;/center&gt;

&lt;p&gt;I’ve numbered each step of the diagram to provide a bit more details about them:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;This is where the story begins. There is no EXIT state in the diagram as the managers normally process requests in an infinite loop. Obviously, there is a way for a concurrent manager process to receive the command to quit when the managers need to be shut down, but that’s not included here for simplicity.&lt;/li&gt;
  &lt;li&gt;Internal Concurrent Manager (ICM) requests the Service Manager (FNDSM) to start up the Concurrent Manager process. For the Standard Manager processes the binary executable FNDLIBR is started, for the Inventory Manager it’s  INVLIBR, and there are others too.&lt;/li&gt;
  &lt;li&gt;The manager process connects to the database and reads the settings (e.g profile options, sleep seconds, cache size).&lt;/li&gt;
  &lt;li&gt;The process saves information about itself in FND_CONCURRENT_PROCESSES table (os process id, database name, instance name, DB session identifiers, logfile path and name and others). It also updates FND_CONCURRENT_QUEUES by increasing the value of RUNNING_PROCESSES.&lt;/li&gt;
  &lt;li&gt;The concurrent manager process collects information from the database to build the SQL for querying the FND_CONCURRENT_REQUESTS table. The query will be used every time the manager process will look for scheduled concurrent requests.  This is the only time the manager process reads the Specialization Rules (which programs it is allowed to execute and which not) from the database. Keep in mind, if the specialization rules are changed while the managers are running, they are bounced without warning as that is the only way to update the specialization rules cached by the manager process.&lt;/li&gt;
  &lt;li&gt;The SQL (from step 4) is executed to collect information about pending concurrent requests from FND_CONCURRENT_REQUESTS table.&lt;/li&gt;
  &lt;li&gt;The results are checked to verify if any requests are pending for execution.&lt;/li&gt;
  &lt;li&gt;If no requests are pending for execution the manager process sleeps and then goes to step 5. The “Sleep Seconds” parameter of the  “Work Shifts” settings of the concurrent manager determines how long the process sleeps before FND_CONCURRENT_REQUESTS table is queried again. This is the only time the “sleep seconds” setting is used.&lt;/li&gt;
  &lt;li&gt;If there is at least one concurrent request pending for execution the concurrent manager process caches rowids for the FND_CONCURRENT_REQUESTS rows of pending concurrent requests. The “Cache Size” setting of the concurrent manager specifies how many rowids to cache.&lt;/li&gt;
  &lt;li&gt;The cached list of rowids is checked to verify if there are any unprocessed concurrent requests (rows in FND_CONCURRENT_REQUESTS table) left .If none are left - the processing returns to step 5 and the FND_CONCURRENT_REQUESTS table is queried again.&lt;/li&gt;
  &lt;li&gt;The next unprocessed rowid is picked from the process cache and the processing starts.&lt;/li&gt;
  &lt;li&gt;Concurrent manager process executes a SELECT-for-UPDATE statement to lock the STATUS_CODE in FND_CONCURRENT_PROCESSES for the request it’s about to process. This is the mechanism to ensure that each concurrent request is executed only once and only by one manager process even if many processes are running simultaneously. The SELECT-for-UPDATE statement can complete with “ORA-00054: resource busy and acquire with NOWAIT specified” or “0 rows updated” if another manager process has started processing the request already.&lt;/li&gt;
  &lt;li&gt;If the STATUS_CODE of the request was locked successfully the concurrent manager executes the concurrent request. The processing moves to step 9 where the cached list of concurrent requests (rowids) is being checked again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The workflow is not very complex, but it’s important to remember there are normally multiple concurrent manager processes running at the same time and they are competing for the requests to run. This competition introduces another dimension of tuning for settings, like number of concurrent manager processes, sleep seconds or cache size. Stay tuned for the next post in the series to find out more!&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle e-Business Suite" />
      
        <category term="Concurrent Processing" />
      
        <category term="Internals" />
      

      
        <category term="cache size" />
      
        <category term="sleep seconds" />
      
        <category term="tuning" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog Concurrent processing is one of the key elements of any e-Business Suite system. It provides scheduling and queueing functionality for background jobs and it’s used by most of the applications modules. As many things depend on concurrent processing it’s important to make sure the configuration is tuned for your requirements and hardware specification. This is the first article in a series about performance of concurrent processing. We’ll take a closer look at the internals of concurrent managers, the settings that affect their performance and the ways of diagnosing performance and configuration issues. Today we’ll start with an overview of the internal workflow of a concurrent manager process. Enjoy the reading.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">The Easy Way of Finding Similar SQL Statements</title>
      
      
      <link href="https://me-dba.com/posts/the-easy-way-of-finding-similar-sql-statements.html" rel="alternate" type="text/html" title="The Easy Way of Finding Similar SQL Statements" />
      
      <published>2013-01-24T18:48:28-06:00</published>
      <updated>2013-01-24T18:48:28-06:00</updated>
      <id>https://me-dba.com/posts/the-easy-way-of-finding-similar-sql-statements</id>
      <content type="html" xml:base="https://me-dba.com/posts/the-easy-way-of-finding-similar-sql-statements.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/the-easy-way-of-finding-similar-sql-statements/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we all know proper use of bind variables in SQL statements is a must to make transaction processing applications scalable. So how do we find the queries that don’t use bind variables and have to be parsed each time they are executed? There is number of ways, but this article is all about the most effective way I know. If you have a better one - let me know please!&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;I still remember the days when I used the &lt;a href=&quot;http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:1163635055580&quot;&gt;method given us by Tom Kyte on asktom.oracle.com&lt;/a&gt; - and it worked perfectly! The basic idea was to capture all SQL statements from v$sqlarea, remove constants from the SQL text and then count the occurrences of the same SQL. Would I use the same method now? Unlikely. The post is antique - it was written back in year 2000, the database software has evolved since then and we’ve been given more effective means to achieve similar results.&lt;/p&gt;

&lt;p&gt;Starting with 10gR2, two interesting columns where introduced in number of views and tables - EXACT_MATCHING_SIGNATURE and FORCE_MATCHING_SIGNATURE. I could find them in at least V$SQLAREA, V$SQL, STATS$SQL_SUMMARY, DBA_HIST_ACTIVE_SESS_HISTORY, DBA_HIST_SQLSTAT and I bet there are more. As you see, they are present all over the place - Shared Pool, ASH, AWR, Statspack (This means we have a good choice of sources to look for problematic SQLs)&lt;/p&gt;

&lt;p&gt;Documentation says EXACT_MATCHING_SIGNATURE is “&lt;em&gt;Signature calculated on the normalized SQL text. The normalization includes the removal of white space and the uppercasing of all non-literal strings&lt;/em&gt;” and FORCE_MATCHING_SIGNATURE is “&lt;em&gt;Signature used when the CURSOR_SHARING parameter is set to FORCE&lt;/em&gt;”. It also appears the signature is just another hash value calculated from SQL statement, but this time it’s a hash of normalized (removed spaces, etc.) SQL statement. Lets’s have a look!&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DUMMY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'B'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;no&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DUMMY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'A'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;no&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DUMMY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'A'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;no&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dummy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;s1&quot;&gt;'A'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;no&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exact_matching_signature&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99999999999999999999999999&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a50&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exact_matching_signature&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SQL_TEXT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sqlarea&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;like&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'%DUMMY%'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;order&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;SQL_ID&lt;/span&gt;           &lt;span class=&quot;n&quot;&gt;EXACT_MATCHING_SIGNATURE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SQL_TEXT&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;------------- --------------------------- --------------------------------------------------&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vum4z2c1rpua&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;13015969835749972382&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dummy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;s1&quot;&gt;'A'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;b8fj5dkrqzkrq&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;13015969835749972382&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DUMMY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'A'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gfrsz0vuczzag&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;13015969835749972382&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DUMMY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'A'&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k1ys5nhrrbk&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;1525540498770831959&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DUMMY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'B'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ckzhurpxb9utu&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;5788880286169998087&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exact_matching_signature&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SQL_TEXT&lt;/span&gt;
                                          &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sqlarea&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;like&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'%DUMMY%
                                          '&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;order&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It’s easy to notice all SQL_IDs are different, but EXACT_MATCHING_SIGNATURE is the same for 3 of statements because of normalization.&lt;/p&gt;

&lt;p&gt;As noted before, FORCE_MATCHING_SIGNATURE is calculated from SQL text as if CURSOR_SHARING would be set to TRUE (you don’t have to set it to TRUE to get the signature values). CURSOR_SHARING=FORCE forces SQL statements to share cursors by replacing constants with bind variables, so all statements that differ only by constants share the same cursor. Let’s have a look at FORCE_MATCHING_SIGNATURE values for the same SQLs:&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;force_matching_signature&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99999999999999999999999999&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;force_matching_signature&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SQL_TEXT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sqlarea&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;like&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'%DUMMY%'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;order&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;SQL_ID&lt;/span&gt;           &lt;span class=&quot;n&quot;&gt;FORCE_MATCHING_SIGNATURE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SQL_TEXT&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;------------- --------------------------- --------------------------------------------------&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vum4z2c1rpua&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;13154199455204052618&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dummy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;s1&quot;&gt;'A'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;b8fj5dkrqzkrq&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;13154199455204052618&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DUMMY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'A'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gfrsz0vuczzag&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;13154199455204052618&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DUMMY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'A'&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k1ys5nhrrbk&lt;/span&gt;        &lt;span class=&quot;mi&quot;&gt;13154199455204052618&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dual&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DUMMY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'B'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ckzhurpxb9utu&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;8230152823949618578&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exact_matching_signature&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SQL_TEXT&lt;/span&gt;
                                          &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sqlarea&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;like&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'%DUMMY%
                                          '&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;order&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fxmcn8hvv59p&lt;/span&gt;         &lt;span class=&quot;mi&quot;&gt;8805530522791470645&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;force_matching_signature&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SQL_TEXT&lt;/span&gt;
                                          &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sqlarea&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;like&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'%DUMMY%
                                          '&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;order&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UPPER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think you know what happens next - finding similar statements becomes as easy as querying the chosen data source (shared pool, AWR, ASH, Statspack) and grouping statements by FORCE_MATCHING_SIGNATURE. Here’s an example for finding one of the top statements not using bind variables properly:&lt;/p&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;col&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;force_matching_signature&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99999999999999999999999999&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;force_matching_signature&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;quot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;Count&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;quot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sqlarea&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;group&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;force_matching_signature&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;order&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;desc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

 &lt;span class=&quot;n&quot;&gt;FORCE_MATCHING_SIGNATURE&lt;/span&gt;        &lt;span class=&quot;k&quot;&gt;Count&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;--------------------------- ----------&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;3832233612528870918&lt;/span&gt;             &lt;span class=&quot;mi&quot;&gt;13251&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;7415896326081021278&lt;/span&gt;              &lt;span class=&quot;mi&quot;&gt;1772&lt;/span&gt;
 &lt;span class=&quot;mi&quot;&gt;12487066559404946962&lt;/span&gt;             &lt;span class=&quot;mi&quot;&gt;1642&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99999&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TEST&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql_fulltext&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;sql&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;force_matching_signature&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;7415896326081021278&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;SQL_FULLTEXT&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;--------------------------------------------------------------------------------&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;account_id&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;accountequip&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;accountequip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;equipment_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1279768275&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;448&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;accountequip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;uninstalltime&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;null&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Performance" />
      
        <category term="Troubleshooting" />
      

      
        <category term="bind variables" />
      
        <category term="signature" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog As we all know proper use of bind variables in SQL statements is a must to make transaction processing applications scalable. So how do we find the queries that don’t use bind variables and have to be parsed each time they are executed? There is number of ways, but this article is all about the most effective way I know. If you have a better one - let me know please!</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">R12.2 online patching – What are the hidden costs?</title>
      
      
      <link href="https://me-dba.com/posts/r12-2-online-patching-what-are-the-hidden-costs.html" rel="alternate" type="text/html" title="R12.2 online patching – What are the hidden costs?" />
      
      <published>2012-01-09T11:32:35-06:00</published>
      <updated>2012-01-09T11:32:35-06:00</updated>
      <id>https://me-dba.com/posts/r12-2-online-patching-what-are-the-hidden-costs</id>
      <content type="html" xml:base="https://me-dba.com/posts/r12-2-online-patching-what-are-the-hidden-costs.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/r12-2-online-patching-what-are-the-hidden-costs/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the hot topics at the UKOUG 2011 Technology and E-Business Suite Conference last December was the upcoming release of Oracle e-Business Suite R12.2. The new release will bring us lots of new features, usability improvements and new versions of technology stack components (Oracle Database 11g R2 and Oracle Fusion Middleware 11g R1 as the application server), but the most important and impressive new feature of course will be online patching. Online patching is supposed to change the game completely. All owners of E-Business Suite environments know that patching requires downtime. Although it can be reduced with various techniques (e.g. staged APPL_TOP), some downtime is still required to apply a number of changes. Online patching will not eliminate downtime completely, but will reduce it significantly by using  “Edition Based Redefinition” (EBR) at the database level and using a &lt;a href=&quot;https://blog.pythian.com/oracle-ebusiness-suite-12-2-online-patching-feature/&quot;&gt;secondary applications file system for online patching&lt;/a&gt;. In fact, all patching activity will be an online operation; downtime will be required only to switch from one version to another.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;I attended a great presentation at UKOUG 2011, “Oracle E-business Suite’s use of edition-based redefinition for online patching,” delivered by Bryn Llewellyn from Oracle. The presentation provided thorough insight on how EBR works and how E-Business Suite will be able to use it for online patching. It answered many questions, but raised a few more questions and concerns. I’ll try to summarize in this post the main concerns I’ve been thinking about after attending this presentation. At this point I have to stop and add a disclaimer. Actually, it’s a double disclaimer, because there was a disclaimer on the 1st slide of the presentation saying something like “don’t take it for granted” as we were discussing features of a product that is not yet released. Since I’m giving you my thoughts on a product which I haven’t seen, here it is: “don’t take it for granted”^2!&lt;/p&gt;

&lt;h3 id=&quot;limitations-of-ebr&quot;&gt;Limitations of EBR&lt;/h3&gt;

&lt;p&gt;Before we move on, I have to give a short background on a few important specifics of EBR, which are taken from the EBR documentation and were also discussed during the presentation (You can read full documentation in &lt;a href=&quot;http://docs.oracle.com/cd/E11882_01/appdev.112/e10471/adfns_editions.htm&quot;&gt;Oracle® Database Advanced Application Developer’s Guide Chapter 19&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;All schema objects can be divided in 2 groups, editionable and non-editionable:
    &lt;ul&gt;
      &lt;li&gt;Editionable objects are synonyms (except public synonyms), views, and all PL/SQL object types (functions, libraries, packages and package bodies, procedures, triggers, types and type bodies).&lt;/li&gt;
      &lt;li&gt;All other objects are non-editionable (e.g. tables, indexes, materialized views, database links, etc.)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Editionable objects can be editioned or potentially editioned
    &lt;ul&gt;
      &lt;li&gt;Editioned editionable objects reside in an editions-enabled schemas;&lt;/li&gt;
      &lt;li&gt;Editionable objects residing in schemas that are not editions-enabled are potentially editioned (I really don’t like this term, as these objects are in fact non-editioned)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;All non-editionable objects are always non-editioned (no matter what schema they reside in)&lt;/li&gt;
  &lt;li&gt;IMPORTANT RULE! A non-editioned (and based on my experiments also potentially editioned) object cannot depend on an editioned object. For example:
    &lt;ul&gt;
      &lt;li&gt;A function-based index cannot depend on an editioned function.&lt;/li&gt;
      &lt;li&gt;A materialized view cannot depend on an editioned view.&lt;/li&gt;
      &lt;li&gt;A table cannot have a column of a user-defined data type (collection or ADT) whose owner is editions-enabled.&lt;/li&gt;
      &lt;li&gt;A materialized view cannot depend on editioned function&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basically, the most important message here is that there are new restrictions introduced on dependencies between different objects.&lt;/p&gt;

&lt;h3 id=&quot;ebr-r122-online-patching-and-our-customizations&quot;&gt;EBR, R12.2, online patching and our customizations.&lt;/h3&gt;

&lt;p&gt;As described before, “a non-editioned object cannot depend on an editioned object”. Think about it! I’ve seen lots of materialized views depending on functions, packages or views,  and tables with user-defined data types.&lt;/p&gt;

&lt;p&gt;Oracle will need to remove as much of these dependencies as possible (as they need as many editioned objects as possible to have a way to change them online); otherwise the online patching would be too limited (which I really hope it won’t be). The presenter also mentioned that a new schema APPS_NE (APPS Non-Editioned) would be introduced in R12.2 to hold  potentially editioned objects for which these dependencies would not be removed. Oracle will take care of these dependencies by separating the editionable objects into 2 schemas instead of one– they will make it work for their objects, don’t worry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 1:&lt;/strong&gt; What I’m worried about are customizations – I’ve seen quite a few environments where custom materialized views are created depending on views and functions. As the views and functions will likely become editioned in R12.2, these custom materialized views will become invalid. What options do we have?&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;We can get lucky and it might turn out that the dependent objects will become non-editioned in schema APPS_NE. In this case, we’d only need to change the schema for the referenced object (remember, APPS synonyms will be editioned);&lt;/li&gt;
  &lt;li&gt;We might need to create duplicate functions in an editions-disabled schema to reference in our custom materialized views If the function we are duplicating is seeded, we will likely miss the moment it changes, so there is an increased risk to get wrong data from the MV. (By the way, creating a non-editioned wrapped function for editioned function is not allowed);&lt;/li&gt;
  &lt;li&gt;We might need to rewrite our materialized views to depend on tables directly (not synonyms or views), but EBS also brings editioning views that allow access to “different versions of data” from the same table. MVs cannot depend on editioning views – so our MVs might require changes whenever the table is modified and a new version of an editioning view is created.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Similar problems could also be introduced with other customized non-editioned objects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 2:&lt;/strong&gt; Online patching might not be as effective as advertised. I’m basing this statement on the information that there would be another schema – APPS_NE – introduced for non-editioned (or potentially editioned) objects. Online patching would not be able to patch these objects – some downtime would be required here as I understand, but probably Oracle has some tricks in mind for this. Also, RDBMS patches would still need downtime.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 3:&lt;/strong&gt; Based on the information available, there would be quite a lot of reorganization going on in seeded schemas, and I still haven’t seen a good document explaining what is going to be changed, and how we should prepare for the changes. This will definitely affect customizations, but there’s still no guideline released on how to make customizations ready for R12.2. Additionally, I think the upgrade to R12.2 might require much downtime to reorganize all the schemas.&lt;/p&gt;

&lt;p&gt;Despite all the concerns and unknown variables, I’m very excited to see Oracle trying to do something that has never been done before! Did you know the main reason they started creating the Edition Based Redefinition feature was the requirement from the ERP team to implement the online patching feature? As the EBR was specifically designed to allow online patching for Oracle e-Business Suite, I hope they will have gotten all the gears right to implement it efficiently enough. R12.2 should be out in 11 months, and I really can’t wait to get my hands dirty with it.&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle e-Business Suite" />
      
        <category term="Maintenance" />
      

      
        <category term="ebr" />
      
        <category term="edition based redefinition" />
      
        <category term="online patching" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog One of the hot topics at the UKOUG 2011 Technology and E-Business Suite Conference last December was the upcoming release of Oracle e-Business Suite R12.2. The new release will bring us lots of new features, usability improvements and new versions of technology stack components (Oracle Database 11g R2 and Oracle Fusion Middleware 11g R1 as the application server), but the most important and impressive new feature of course will be online patching. Online patching is supposed to change the game completely. All owners of E-Business Suite environments know that patching requires downtime. Although it can be reduced with various techniques (e.g. staged APPL_TOP), some downtime is still required to apply a number of changes. Online patching will not eliminate downtime completely, but will reduce it significantly by using “Edition Based Redefinition” (EBR) at the database level and using a secondary applications file system for online patching. In fact, all patching activity will be an online operation; downtime will be required only to switch from one version to another.</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">UKOUG2011 E-Business Suite Concurrent Processing Performance Analysis</title>
      
      
      <link href="https://me-dba.com/posts/ukoug2011-e-business-suite-concurrent-processing-performance-analysis.html" rel="alternate" type="text/html" title="UKOUG2011 E-Business Suite Concurrent Processing Performance Analysis" />
      
      <published>2011-12-05T07:03:50-06:00</published>
      <updated>2011-12-05T07:03:50-06:00</updated>
      <id>https://me-dba.com/posts/ukoug2011-e-business-suite-concurrent-processing-performance-analysis</id>
      <content type="html" xml:base="https://me-dba.com/posts/ukoug2011-e-business-suite-concurrent-processing-performance-analysis.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/ukoug2011-e-business-suite-concurrent-processing-performance-analysis/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another December has started and you know what it means right? It’s the Christmas time? NO! It’s time for UKOUG Technology and e-Business Suite 2011 conference! There are not many things that can make a passionate Apps DBA more excited than that. UKOUG Tech &amp;amp; eBS conferences are the only ones in Europe that have such a rich content for Application DBAs and this year it will not be different.&lt;/p&gt;

&lt;p&gt;For me, the UKOUG Conference 2011 is going to be a very special one. I have some really good reasons for that: For the 1st time I’m representing Pythian at an international conference, I’m proud of that, but it also adds some additional pressure on my shoulders. It’s the 5th time I’m presenting at UKOUG conference (a little anniversary for me). And, I’m meeting few of my colleagues in person, which is really important as I’m working remotely from home and therefore miss seeing people and this is a good chance for me to catch up a bit on that.&lt;/p&gt;

&lt;p&gt;How did I get here? Even though there are many eBS sessions during these conferences I think there’s not enough content specifically for Apps DBAs, there are a lot of presentation usually surrounding upgrading 11i to R12, R12 to Fusion Apps, etc., there’s always some presentations on how to integrate eBS with this and that, there’s almost always some presentations on how to configure something and presentations about what’s on the roadmap for us. In my opinion there are not enough presentations for Apps DBAs that would give you something that would be useful every day, something you can use when you go back to work after the conference. Therefore I thought I needed to improve the situation and submitted a presentation “Concurrent Processing Performance Analysis for Apps DBAs” and fortunately enough it got accepted.&lt;/p&gt;

&lt;p&gt;If you are an apps DBA, please come and see the presentation on Wednesday, December 7th in Hall 10B at 14:25. I’ll give you the tools and knowledge to analyze the concurrent processing performance on your own. You will know how to find answers for questions like these after the presentation:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Are there any periods of time when the pending times of the concurrent requests are longer than expected?&lt;/li&gt;
  &lt;li&gt;Which concurrent programs are affected the most by increased pending times&lt;/li&gt;
  &lt;li&gt;How to find out which requests exactly were pending to be executed by the manager?&lt;/li&gt;
  &lt;li&gt;What was the root cause the request was pending (incompatibility with other requests or all of the managers were occupied)&lt;/li&gt;
  &lt;li&gt;Which were the conflicting requests?&lt;/li&gt;
  &lt;li&gt;Which managers could have run the requests?&lt;/li&gt;
  &lt;li&gt;Which requests were processed on these concurrent managers at that time?&lt;/li&gt;
  &lt;li&gt;What was the utilization level of particular concurrent managers?&lt;/li&gt;
  &lt;li&gt;Are there too many, too few concurrent processes configured?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope to see you on Wednesday if you interested!&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle e-Business Suite" />
      
        <category term="Presentations" />
      
        <category term="Concurrent Processing" />
      
        <category term="Performance" />
      
        <category term="Troubleshooting" />
      

      

      
        <summary type="html">This blog post was originally released on Pythian blog Another December has started and you know what it means right? It’s the Christmas time? NO! It’s time for UKOUG Technology and e-Business Suite 2011 conference! There are not many things that can make a passionate Apps DBA more excited than that. UKOUG Tech &amp;amp; eBS conferences are the only ones in Europe that have such a rich content for Application DBAs and this year it will not be different. For me, the UKOUG Conference 2011 is going to be a very special one. I have some really good reasons for that: For the 1st time I’m representing Pythian at an international conference, I’m proud of that, but it also adds some additional pressure on my shoulders. It’s the 5th time I’m presenting at UKOUG conference (a little anniversary for me). And, I’m meeting few of my colleagues in person, which is really important as I’m working remotely from home and therefore miss seeing people and this is a good chance for me to catch up a bit on that. How did I get here? Even though there are many eBS sessions during these conferences I think there’s not enough content specifically for Apps DBAs, there are a lot of presentation usually surrounding upgrading 11i to R12, R12 to Fusion Apps, etc., there’s always some presentations on how to integrate eBS with this and that, there’s almost always some presentations on how to configure something and presentations about what’s on the roadmap for us. In my opinion there are not enough presentations for Apps DBAs that would give you something that would be useful every day, something you can use when you go back to work after the conference. Therefore I thought I needed to improve the situation and submitted a presentation “Concurrent Processing Performance Analysis for Apps DBAs” and fortunately enough it got accepted. If you are an apps DBA, please come and see the presentation on Wednesday, December 7th in Hall 10B at 14:25. I’ll give you the tools and knowledge to analyze the concurrent processing performance on your own. You will know how to find answers for questions like these after the presentation: Are there any periods of time when the pending times of the concurrent requests are longer than expected? Which concurrent programs are affected the most by increased pending times How to find out which requests exactly were pending to be executed by the manager? What was the root cause the request was pending (incompatibility with other requests or all of the managers were occupied) Which were the conflicting requests? Which managers could have run the requests? Which requests were processed on these concurrent managers at that time? What was the utilization level of particular concurrent managers? Are there too many, too few concurrent processes configured? I hope to see you on Wednesday if you interested!</summary>
      

      
      
    </entry>
  
  
  
    <entry>
      
      <title type="html">Back to School: Elementary Physics for DBAs</title>
      
      
      <link href="https://me-dba.com/posts/back-to-school-elementary-physics-for-dbas.html" rel="alternate" type="text/html" title="Back to School: Elementary Physics for DBAs" />
      
      <published>2011-10-07T06:31:59-05:00</published>
      <updated>2011-10-07T06:31:59-05:00</updated>
      <id>https://me-dba.com/posts/back-to-school-elementary-physics-for-dbas</id>
      <content type="html" xml:base="https://me-dba.com/posts/back-to-school-elementary-physics-for-dbas.html">&lt;p&gt;This blog post was originally released on &lt;a href=&quot;https://blog.pythian.com/back-to-school-elementary-physics-for-dbas/&quot;&gt;Pythian blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“Hello World!” I guess that’s the most appropriate way to start my 1st blog post under pythian.com domain. I’m going to start slow, but hopefully will pick up speed and have at least couple of posts each month to share with you. I’ve been blogging at http://appsdbalife.wordpress.com/ until now and I haven’t decided yet what the future will be for my previous blog, I wouldn’t like it to become some kind of a zombie page that’s been long dead but still wandering around the internet world.&lt;/p&gt;

&lt;p&gt;Enough intros, let’s get to business! I hope this blog post doesn’t get lost in the huge amount of posts related to OOW 2011.&lt;/p&gt;

&lt;p&gt;A few days ago I was asked to estimate how much space needed to be added to the ASM diskgroup to handle the database growth for one year without additional need of adding disks. Obviously, to estimate the disk space that needed to be added I had to know what the DB size will be in one year from now. It looked like an easy task as I knew we were recording the size of the database every day.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;I checked the size of the database – it was 887.3Gb and a month ago the size of the database was 856.9Gb, so it had increased by 30.4Gb in one month.  30.4Gb multiplied by 12 months equals 364.8Gb, so the database will be ~1252Gb after one year. That was easy right?&lt;/p&gt;

&lt;p&gt;But wait a second!  Wouldn’t it be logical that as the DB becomes bigger (there is more activity; there are more users and more transactions, more everything) then it grows quicker too? So I checked how much the DB increased during one month exactly one year ago – 21.2Gb (the DB size was 740.3Gb at that time). Looking at this number I instantly knew the DB size I calculated earlier was not correct.&lt;/p&gt;

&lt;p&gt;This was the moment where physics kicked in. Velocity, distance and time could easily be substituted for DB growth in one month, size of the DB and time.  Also, as the “velocity” has increased during one year we deal with some acceleration too. I graduated high school 10 years ago, so I had to look up the formulas. At first I needed to calculate acceleration and assuming the acceleration stays the same I would be able to calculate the “distance” or (how much the DB would grow in one year). I used the following formulas (where s = distance,  u = initial velocity,  v = final velocity,  a = uniform acceleration,  t = time):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;v^2 = u^2 + 2as&lt;/li&gt;
  &lt;li&gt;s = u&lt;em&gt;t + (a&lt;/em&gt;t^2)/2&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I applied the 1st formula on the variables I had (v=30.4 Gb/month, u=21.2 Gb/month, t=12 months, s=887.3-740.3=147 Gb), so the results were:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;v^2 = u^2 + 2as&lt;/li&gt;
  &lt;li&gt;30.4^2 = 21.2^2 + 2&lt;em&gt;a&lt;/em&gt;147&lt;/li&gt;
  &lt;li&gt;924.16 = 449.44 + 294*a&lt;/li&gt;
  &lt;li&gt;474.72 = 294*a&lt;/li&gt;
  &lt;li&gt;a = ~1.6147 (Gb/month^2)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As I had the acceleration of the DB growth I could calculate the estimated growth of the database during one year (u=30.4 Gb/month, t=12 months, a = ~1.6147 Gb/month^2), and the result was:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;s = u&lt;em&gt;t + (a&lt;/em&gt;t^2)/2&lt;/li&gt;
  &lt;li&gt;s = 30.4&lt;em&gt;12 + (1.6147&lt;/em&gt;12^2)/2&lt;/li&gt;
  &lt;li&gt;s = 364.8 + 1.6147*144/2&lt;/li&gt;
  &lt;li&gt;s = 364.8 + 116.2584&lt;/li&gt;
  &lt;li&gt;s = ~481.1 Gb&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Based on these calculations the size of the DB would be 887.3 + 481.1 = 1368.4Gb, which is quite different from 1252Gb that I calculated before.  I used the estimated DB size of 1368.4GB to calculate how much disk space needed to be added to the ASM disk group in the end.&lt;/p&gt;

&lt;p&gt;Of course, the acceleration of the DB growth might not be uniform in reality but I think it’s still better to use this, as it’s likely to be more accurate compared to result based on the assumption that the DB growth is constant. You can do the same calculations for different types of data – it is not bound to the database, use it to estimate the total size of apache logs or the total size of concurrent request output files if you’re running e-Business Suite. Keep in mind the estimates are only estimates don’t rely on them 100% and they are going to be more accurate if the input data are accurate.&lt;/p&gt;

&lt;p&gt;I hope you enjoyed reading this. See you next time!&lt;/p&gt;</content>

      
      
      
      
      

      
        <author>
            <name>Maris Elsins</name>
          
          
        </author>
      

      
        <category term="Oracle Database" />
      
        <category term="Monitoring" />
      

      
        <category term="space" />
      
        <category term="capacity planning" />
      

      
        <summary type="html">This blog post was originally released on Pythian blog “Hello World!” I guess that’s the most appropriate way to start my 1st blog post under pythian.com domain. I’m going to start slow, but hopefully will pick up speed and have at least couple of posts each month to share with you. I’ve been blogging at http://appsdbalife.wordpress.com/ until now and I haven’t decided yet what the future will be for my previous blog, I wouldn’t like it to become some kind of a zombie page that’s been long dead but still wandering around the internet world. Enough intros, let’s get to business! I hope this blog post doesn’t get lost in the huge amount of posts related to OOW 2011. A few days ago I was asked to estimate how much space needed to be added to the ASM diskgroup to handle the database growth for one year without additional need of adding disks. Obviously, to estimate the disk space that needed to be added I had to know what the DB size will be in one year from now. It looked like an easy task as I knew we were recording the size of the database every day.</summary>
      

      
      
    </entry>
  
  
</feed>
