<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SQL execution times from ASH</title>
	<atom:link href="/2011/05/04/sql-execution-times-from-ash/feed/" rel="self" type="application/rss+xml" />
	<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/</link>
	<description>database performance, SQL tuning and data visualizatoin</description>
	<lastBuildDate>Sat, 03 Mar 2018 05:02:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6</generator>
	<item>
		<title>By: Kyle Hailey</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-146587</link>
		<dc:creator>Kyle Hailey</dc:creator>
		<pubDate>Mon, 03 Jun 2013 03:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-146587</guid>
		<description><![CDATA[MX AV and MIN are the maximum, average and minimum execution times for the SQL statements in seconds, but seconds based on ASH sampling, so it&#039;s not exact but statistically sufficient for queries that take more than a second.]]></description>
		<content:encoded><![CDATA[<p>MX AV and MIN are the maximum, average and minimum execution times for the SQL statements in seconds, but seconds based on ASH sampling, so it&#8217;s not exact but statistically sufficient for queries that take more than a second.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lmwang</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-146554</link>
		<dc:creator>lmwang</dc:creator>
		<pubDate>Mon, 03 Jun 2013 01:55:06 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-146554</guid>
		<description><![CDATA[Hi Kyle,
Do MX AV MIN mean in seconds?
THanks
lmwang]]></description>
		<content:encoded><![CDATA[<p>Hi Kyle,<br />
Do MX AV MIN mean in seconds?<br />
THanks<br />
lmwang</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drill down to sql_id execution details in ASH &#124; bdt&#039;s oracle blog</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-29063</link>
		<dc:creator>Drill down to sql_id execution details in ASH &#124; bdt&#039;s oracle blog</dc:creator>
		<pubDate>Fri, 19 Apr 2013 13:17:59 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-29063</guid>
		<description><![CDATA[[...] metrics as avg, min, max execution time: You can see some good examples of sql_exec_id usage into Kyle Hailey&#8217;s blog post or Karl Arao&#8217;s [...]]]></description>
		<content:encoded><![CDATA[<p>[...] metrics as avg, min, max execution time: You can see some good examples of sql_exec_id usage into Kyle Hailey&#8217;s blog post or Karl Arao&#8217;s [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dboptimizer.com &#124; xfang</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-11360</link>
		<dc:creator>dboptimizer.com &#124; xfang</dc:creator>
		<pubDate>Fri, 28 Dec 2012 14:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-11360</guid>
		<description><![CDATA[[...] http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/ [...]]]></description>
		<content:encoded><![CDATA[<p>[...] <a href="/2011/05/04/sql-execution-times-from-ash/" rel="nofollow">http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DB Optimizer &#187; Tuning Blog Entries</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-691</link>
		<dc:creator>DB Optimizer &#187; Tuning Blog Entries</dc:creator>
		<pubDate>Thu, 20 Oct 2011 17:11:57 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-691</guid>
		<description><![CDATA[[...] SQL execution times from ASH &#8211; using ASH to see SQL execution times and execution time variations [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL execution times from ASH &#8211; using ASH to see SQL execution times and execution time variations [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Hailey</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-463</link>
		<dc:creator>Kyle Hailey</dc:creator>
		<pubDate>Wed, 20 Jul 2011 18:47:06 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-463</guid>
		<description><![CDATA[&lt;a href=&quot;#comment-295&quot; rel=&quot;nofollow&quot;&gt;@Kyle Hailey&lt;/a&gt; 
SOmething like this should work with SASH for queries over 5 minutes:
&lt;PRE&gt;
select * from (
   select
        count(*),
        sql_id,
        fixed_table_sequence
   from sash
   where
          sql_id &gt; 0
     and  sql_id is not null
   group by
            sql_id,
            fixed_table_sequence,
   having count(*) &gt; 300 
/
&lt;/PRE&gt;]]></description>
		<content:encoded><![CDATA[<p><a href="#comment-295" rel="nofollow">@Kyle Hailey</a><br />
SOmething like this should work with SASH for queries over 5 minutes:</p>
<pre>
select * from (
   select
        count(*),
        sql_id,
        fixed_table_sequence
   from sash
   where
          sql_id > 0
     and  sql_id is not null
   group by
            sql_id,
            fixed_table_sequence,
   having count(*) > 300 
/
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: DB Optimizer &#187; SQL timings for ASH II</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-321</link>
		<dc:creator>DB Optimizer &#187; SQL timings for ASH II</dc:creator>
		<pubDate>Thu, 19 May 2011 04:08:52 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-321</guid>
		<description><![CDATA[[...]    recent commentsDB Optimizer &#187; SQL execution times from ASH on SQL ASH timings IIIMark Entwistle on ToolsKyle Hailey on SQL ASH timings IIIKyle Hailey on SQL [...]]]></description>
		<content:encoded><![CDATA[<p>[...]    recent commentsDB Optimizer &raquo; SQL execution times from ASH on SQL ASH timings IIIMark Entwistle on ToolsKyle Hailey on SQL ASH timings IIIKyle Hailey on SQL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Hailey</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-307</link>
		<dc:creator>Kyle Hailey</dc:creator>
		<pubDate>Fri, 13 May 2011 04:33:21 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-307</guid>
		<description><![CDATA[&lt;a href=&quot;#comment-299&quot; rel=&quot;nofollow&quot;&gt;@coskan gundogar&lt;/a&gt; 
Hi Coskan,
 Do you have any example output? Or better yet an export of the AWR that I could import and run queries on?
THanks
Kyle]]></description>
		<content:encoded><![CDATA[<p><a href="#comment-299" rel="nofollow">@coskan gundogar</a><br />
Hi Coskan,<br />
 Do you have any example output? Or better yet an export of the AWR that I could import and run queries on?<br />
THanks<br />
Kyle</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: coskan gundogar</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-299</link>
		<dc:creator>coskan gundogar</dc:creator>
		<pubDate>Wed, 11 May 2011 11:54:43 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-299</guid>
		<description><![CDATA[Hi Kyle,

Script is very useful and sql_exec_id is very wise to use. 

One thing to bear in mind, I don&#039;t know if it is a bug on our 11.2.0.1 DB but I can see a sql which runs 2 seconds has got sql_exec_start_date back in 15 days ago which can cause misleading conclusions with the sql you shared.]]></description>
		<content:encoded><![CDATA[<p>Hi Kyle,</p>
<p>Script is very useful and sql_exec_id is very wise to use. </p>
<p>One thing to bear in mind, I don&#8217;t know if it is a bug on our 11.2.0.1 DB but I can see a sql which runs 2 seconds has got sql_exec_start_date back in 15 days ago which can cause misleading conclusions with the sql you shared.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Hailey</title>
		<link>http://dboptimizer.com/2011/05/04/sql-execution-times-from-ash/#comment-295</link>
		<dc:creator>Kyle Hailey</dc:creator>
		<pubDate>Fri, 06 May 2011 23:56:28 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=785#comment-295</guid>
		<description><![CDATA[If you use &lt;a href=http://ashmasters.com/ash-simulation/ rel=&quot;nofollow&quot;&gt;SASH&lt;/A&gt; you can do similar queries using fixed_table_sequence:
This shows the top twolongest running queries every 15 minute period. The higher the count the longer
 they have been running (you can&#039;t do this with 10g ASH)
&lt;table style=&quot;border: solid 2px #ffffff;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;border: solid 2px #ffffff; padding-right: .5em;&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;border: solid 2px #ffffff; padding-right: .5em;&quot;&gt;
&lt;pre class=&quot;brush:c gutter: false;&quot; style=&quot;padding-left: 60px;&quot;&gt;
   START_TIME     COUNT(*)     SQL_ID FIXED_TABLE_SEQUENCE       TOPN
   ------------ ---------- ---------- -------------------- ----------
   JUN-01 02:00         29  795857215                34254          1
   JUN-01 02:00         29  795857215                34547          1
   JUN-01 02:00         29  986013188                34305          1
   JUN-01 02:15        105  452165714                35961          1
   JUN-01 02:15        102  866152581                35999          2
   JUN-01 02:30        119 2586830956                39017          1
   JUN-01 02:30        109  452165714                39130          2
&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table style=&quot;border: solid 2px #ffffff;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;border: solid 2px #ffffff; padding-right: .5em;&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;border: solid 2px #ffffff; padding-right: .5em;&quot;&gt;
&lt;pre class=&quot;brush:c gutter: false;&quot; style=&quot;padding-left: 60px;&quot;&gt;
break on  start_time
clear breaks
column f_secs new_value v_secs
column f_mins new_value v_mins
select 900 f_secs from dual;
select &amp;v_secs/60 f_mins from dual;

select * from (
   select
        to_char(trunc(sample_time,&#039;HH&#039;)+
             (trunc((sample_time-trunc(sample_time,&#039;HH&#039;))*24/(&amp;v_mins/60))+1)/(60/&amp;v_mins)/24 ,&#039;MON-DD HH:MI&#039;) start_time,
        count(*),
        sql_id,
        fixed_table_sequence,
        rank()
          over (
            partition by
                    trunc(sample_time,&#039;HH&#039;)+
             (trunc((sample_time-trunc(sample_time,&#039;HH&#039;))*24/(&amp;v_mins/60))+1)/(60/&amp;v_mins)/24
            order by count(*) desc ) topn
   from sash
   where
          sql_id &gt; 0
     and  sql_id is not null
     and  sample_time &gt; sysdate - (30)/(24*60)
   group by
            sql_id,
            fixed_table_sequence,
            trunc(sample_time,&#039;HH&#039;)+
            (trunc((sample_time-trunc(sample_time,&#039;HH&#039;))*24/(&amp;v_mins/60))+1)/(60/&amp;v_mins)/24
)
where  topn &lt; 3
/
clear breaks

&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;]]></description>
		<content:encoded><![CDATA[<p>If you use <a href=http://ashmasters.com/ash-simulation/ rel="nofollow">SASH</a> you can do similar queries using fixed_table_sequence:<br />
This shows the top twolongest running queries every 15 minute period. The higher the count the longer<br />
 they have been running (you can&#8217;t do this with 10g ASH)</p>
<table style="border: solid 2px #ffffff;">
<tbody>
<tr>
<td style="border: solid 2px #ffffff; padding-right: .5em;"></td>
<td style="border: solid 2px #ffffff; padding-right: .5em;">
<pre class="brush:c gutter: false;" style="padding-left: 60px;">
   START_TIME     COUNT(*)     SQL_ID FIXED_TABLE_SEQUENCE       TOPN
   ------------ ---------- ---------- -------------------- ----------
   JUN-01 02:00         29  795857215                34254          1
   JUN-01 02:00         29  795857215                34547          1
   JUN-01 02:00         29  986013188                34305          1
   JUN-01 02:15        105  452165714                35961          1
   JUN-01 02:15        102  866152581                35999          2
   JUN-01 02:30        119 2586830956                39017          1
   JUN-01 02:30        109  452165714                39130          2
</pre>
</td>
</tr>
</tbody>
</table>
<table style="border: solid 2px #ffffff;">
<tbody>
<tr>
<td style="border: solid 2px #ffffff; padding-right: .5em;"></td>
<td style="border: solid 2px #ffffff; padding-right: .5em;">
<pre class="brush:c gutter: false;" style="padding-left: 60px;">
break on  start_time
clear breaks
column f_secs new_value v_secs
column f_mins new_value v_mins
select 900 f_secs from dual;
select &#038;v_secs/60 f_mins from dual;

select * from (
   select
        to_char(trunc(sample_time,'HH')+
             (trunc((sample_time-trunc(sample_time,'HH'))*24/(&#038;v_mins/60))+1)/(60/&#038;v_mins)/24 ,'MON-DD HH:MI') start_time,
        count(*),
        sql_id,
        fixed_table_sequence,
        rank()
          over (
            partition by
                    trunc(sample_time,'HH')+
             (trunc((sample_time-trunc(sample_time,'HH'))*24/(&#038;v_mins/60))+1)/(60/&#038;v_mins)/24
            order by count(*) desc ) topn
   from sash
   where
          sql_id > 0
     and  sql_id is not null
     and  sample_time > sysdate - (30)/(24*60)
   group by
            sql_id,
            fixed_table_sequence,
            trunc(sample_time,'HH')+
            (trunc((sample_time-trunc(sample_time,'HH'))*24/(&#038;v_mins/60))+1)/(60/&#038;v_mins)/24
)
where  topn < 3
/
clear breaks

</pre>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
	</item>
</channel>
</rss>
