<?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: Advanced Oracle Troubleshooting Guide: When the wait interface is not enough [part 1]</title>
	<atom:link href="http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/</link>
	<description>Oracle troubleshooting, internals and performance tuning</description>
	<lastBuildDate>Mon, 15 Mar 2010 01:50:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alter system kill session and ORA-00031: session marked for kill &#124; Tanel Poder's blog: Core IT for Geeks and Pros</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-2295</link>
		<dc:creator>Alter system kill session and ORA-00031: session marked for kill &#124; Tanel Poder's blog: Core IT for Geeks and Pros</dc:creator>
		<pubDate>Thu, 13 Aug 2009 07:22:40 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-2295</guid>
		<description>[...] target session to die &#8211; what is the wait event you are waiting on then? Every wait, except few bugs, should be instrumented in [...]</description>
		<content:encoded><![CDATA[<p>[...] target session to die &#8211; what is the wait event you are waiting on then? Every wait, except few bugs, should be instrumented in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-783</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Sat, 10 Jan 2009 09:41:41 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-783</guid>
		<description>Hi Martin,

Yeah, starting from 11.1.0.7 (and probably 10.2.0.5 but I haven&#039;t checked) there are new wait events related to external table access:

SQL&gt; @sed &quot;external table&quot;

&lt;code&gt;EVENT# EVENT_NAME                                    PARAMETER1                     PARAMETER2                     PARAMETER3
------ --------------------------------------------- ------------------------------ ------------------------------ ----------
   293 external table misc IO                        filectx                        iocode                         P3
   291 external table read                           filectx                        file#                          size
   292 external table write                          filectx                        file#                          size&lt;/code&gt;


Btw, I don&#039;t have to ask, I *know* that it&#039;s fun to read old (quality) blog entries on Saturday evenings! ;)</description>
		<content:encoded><![CDATA[<p>Hi Martin,</p>
<p>Yeah, starting from 11.1.0.7 (and probably 10.2.0.5 but I haven&#8217;t checked) there are new wait events related to external table access:</p>
<p>SQL> @sed &#8220;external table&#8221;</p>
<p><code>EVENT# EVENT_NAME                                    PARAMETER1                     PARAMETER2                     PARAMETER3<br />
------ --------------------------------------------- ------------------------------ ------------------------------ ----------<br />
   293 external table misc IO                        filectx                        iocode                         P3<br />
   291 external table read                           filectx                        file#                          size<br />
   292 external table write                          filectx                        file#                          size</code></p>
<p>Btw, I don&#8217;t have to ask, I *know* that it&#8217;s fun to read old (quality) blog entries on Saturday evenings! ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Berger</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-778</link>
		<dc:creator>Martin Berger</dc:creator>
		<pubDate>Fri, 09 Jan 2009 20:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-778</guid>
		<description>You should just have waited for 18 months or more and change the Release (or wait any longer for 10.2.0.5). 
Now Preprocessor For External Tables is out and should solve all these problems (whereas it should be still checked how it&#039;s shown in wait events).
Just for the records (I&#039;m sure you know it): http://structureddata.org/2008/11/19/preprocessor-for-external-tables/
Before you ask: yes, it&#039;s fun to read old blog entries on Saturday evening! ;-)</description>
		<content:encoded><![CDATA[<p>You should just have waited for 18 months or more and change the Release (or wait any longer for 10.2.0.5).<br />
Now Preprocessor For External Tables is out and should solve all these problems (whereas it should be still checked how it&#8217;s shown in wait events).<br />
Just for the records (I&#8217;m sure you know it): <a href="http://structureddata.org/2008/11/19/preprocessor-for-external-tables/" rel="nofollow">http://structureddata.org/2008/11/19/preprocessor-for-external-tables/</a><br />
Before you ask: yes, it&#8217;s fun to read old blog entries on Saturday evening! ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jiulu sun</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-65</link>
		<dc:creator>jiulu sun</dc:creator>
		<pubDate>Mon, 08 Dec 2008 20:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-65</guid>
		<description>nice work, where can i find your article of &quot;I will deal with more complex problems like what to do when the session is not reporting significant waits and is spinning heavily on CPU&quot;, that seems exactly happened on my system.</description>
		<content:encoded><![CDATA[<p>nice work, where can i find your article of &#8220;I will deal with more complex problems like what to do when the session is not reporting significant waits and is spinning heavily on CPU&#8221;, that seems exactly happened on my system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: My Blog is 1 year old! 8-) &#171; Tanel Poder&#8217;s blog: Core IT for geeks and pros</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-63</link>
		<dc:creator>My Blog is 1 year old! 8-) &#171; Tanel Poder&#8217;s blog: Core IT for geeks and pros</dc:creator>
		<pubDate>Fri, 20 Jun 2008 17:05:46 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-63</guid>
		<description>[...] wrote my first real blog entry on 18th June 2007, about advanced Oracle troubleshooting in cases where conventional methods are [...]</description>
		<content:encoded><![CDATA[<p>[...] wrote my first real blog entry on 18th June 2007, about advanced Oracle troubleshooting in cases where conventional methods are [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Car</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-62</link>
		<dc:creator>Car</dc:creator>
		<pubDate>Fri, 11 Apr 2008 14:53:25 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-62</guid>
		<description>Based on your review no 16, to whom SECONDS_IN_WAIT that accounted when not waiting at all (constantly on cpu) belongs ? How do you got that ? Please clarify ?</description>
		<content:encoded><![CDATA[<p>Based on your review no 16, to whom SECONDS_IN_WAIT that accounted when not waiting at all (constantly on cpu) belongs ? How do you got that ? Please clarify ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #60: a Carnival of the Vanities for DBAs &#183; Steve Karam &#183; The Oracle Alchemist</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-61</link>
		<dc:creator>Log Buffer #60: a Carnival of the Vanities for DBAs &#183; Steve Karam &#183; The Oracle Alchemist</dc:creator>
		<pubDate>Fri, 31 Aug 2007 16:03:28 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-61</guid>
		<description>[...] I can&#8217;t resist going back to Oracle. Tanel Poder has posted an outstanding article on advanced Oracle troubleshooting when the wait interface is not enough. Consequently, this is his first post on the new blog, and I hope to see more great articles like [...]</description>
		<content:encoded><![CDATA[<p>[...] I can&#8217;t resist going back to Oracle. Tanel Poder has posted an outstanding article on advanced Oracle troubleshooting when the wait interface is not enough. Consequently, this is his first post on the new blog, and I hope to see more great articles like [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Advanced Oracle Troubleshooting Guide, Part 2: No magic is needed, systematic approach will do &#171; Tanel Poder&#8217;s blog: Core IT for geeks and pros</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-60</link>
		<dc:creator>Advanced Oracle Troubleshooting Guide, Part 2: No magic is needed, systematic approach will do &#171; Tanel Poder&#8217;s blog: Core IT for geeks and pros</dc:creator>
		<pubDate>Sun, 26 Aug 2007 17:52:03 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-60</guid>
		<description>[...] is, even if the session statistics and wait interface are not enough (as I started blogging in my previous post in this [...]</description>
		<content:encoded><![CDATA[<p>[...] is, even if the session statistics and wait interface are not enough (as I started blogging in my previous post in this [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Case Study: Statspack/AWR Latch Waits (Part 2) : Ardent Performance Computing</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-59</link>
		<dc:creator>Case Study: Statspack/AWR Latch Waits (Part 2) : Ardent Performance Computing</dc:creator>
		<pubDate>Fri, 29 Jun 2007 16:21:59 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-59</guid>
		<description>[...] read a great quote from Tanel Poder&#8217;s blog recently&#8230; I think I&#8217;ll call it Tanil&#8217;s dictum: &#8220;lower-level instrumentation always has a better chance to know what’s really going on at [...]</description>
		<content:encoded><![CDATA[<p>[...] read a great quote from Tanel Poder&#8217;s blog recently&#8230; I think I&#8217;ll call it Tanil&#8217;s dictum: &#8220;lower-level instrumentation always has a better chance to know what’s really going on at [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/comment-page-1/#comment-58</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Sun, 24 Jun 2007 12:19:53 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/18/advanced-oracle-troubleshooting-guide-when-the-wait-interface-is-not-enough-part-1/#comment-58</guid>
		<description>This IS a bug as I have &lt;i&gt;proven&lt;/i&gt; already. Oracle IS WAITING in a OS read syscall and the only correct state in V$SESSION_WAIT.STATE is WAITING, regardless of values in any other columns. This contradiction alone proves that Oracle behaves incorrectly.

Regarding what documentation says, the section about wait interface in Oracle has always been lacking concreteness, thus the myths about having to use the WAIT_TIME and such. Just the fact that something is documented, doesn&#039;t make it a fact ;-)

The SECONDS_OF_WAIT is an unfortunate misnaming, it should really be called SECONDS_IN_STATE, as it&#039;s just the time since last wait state change (e.g. from waiting to not-waiting or vice versa). It&#039;s measured and incremented even if being constantly on CPU without any waiting at all. Every time LGWR runs, it calculates the time delta since last wait state change for each session and updates the fixed table under V$SESSION_WAIT.

Normally when you enter a wait, this wait state change timestamp is reset and SEQ# is incremented. What happens in my test case, however, is that both last SEQ# and SECONDS_IN_WAIT are not changed at all, their values persist (the latter continues to increment, is not zeroed).

I suspect this lack of instrumentation is because external tables use an ODCI cartridge for loading data, which in turn call &quot;trusted&quot; external sqlldr library functions (which however are linked in to oracle binary on Solaris). Perhaps noone wanted to change the generic sqlldr functions to include wait instrumentation, perhaps there are limitations altering sessions wait state from external library, perhaps it was just missed...

Note that the wait event should not have been a db file scattered nor sequential read as the external tables do not read from datafiles to buffer cache, they just invoke ODCI cartride, which invokes a method from object type (ORACLE_LOADER in our case) which in turn call a function in external library (qxxq_fetch in qxxqlib) for reading the data from text file using sqlloader functions. The returned data is presented as a rowsource to the consumer who invoked external table read. Now that I look into it, I don&#039;t even see a wait event anything named &quot;external&quot; or ODCI related. So perhaps it&#039;s a design flaw.</description>
		<content:encoded><![CDATA[<p>This IS a bug as I have <i>proven</i> already. Oracle IS WAITING in a OS read syscall and the only correct state in V$SESSION_WAIT.STATE is WAITING, regardless of values in any other columns. This contradiction alone proves that Oracle behaves incorrectly.</p>
<p>Regarding what documentation says, the section about wait interface in Oracle has always been lacking concreteness, thus the myths about having to use the WAIT_TIME and such. Just the fact that something is documented, doesn&#8217;t make it a fact ;-)</p>
<p>The SECONDS_OF_WAIT is an unfortunate misnaming, it should really be called SECONDS_IN_STATE, as it&#8217;s just the time since last wait state change (e.g. from waiting to not-waiting or vice versa). It&#8217;s measured and incremented even if being constantly on CPU without any waiting at all. Every time LGWR runs, it calculates the time delta since last wait state change for each session and updates the fixed table under V$SESSION_WAIT.</p>
<p>Normally when you enter a wait, this wait state change timestamp is reset and SEQ# is incremented. What happens in my test case, however, is that both last SEQ# and SECONDS_IN_WAIT are not changed at all, their values persist (the latter continues to increment, is not zeroed).</p>
<p>I suspect this lack of instrumentation is because external tables use an ODCI cartridge for loading data, which in turn call &#8220;trusted&#8221; external sqlldr library functions (which however are linked in to oracle binary on Solaris). Perhaps noone wanted to change the generic sqlldr functions to include wait instrumentation, perhaps there are limitations altering sessions wait state from external library, perhaps it was just missed&#8230;</p>
<p>Note that the wait event should not have been a db file scattered nor sequential read as the external tables do not read from datafiles to buffer cache, they just invoke ODCI cartride, which invokes a method from object type (ORACLE_LOADER in our case) which in turn call a function in external library (qxxq_fetch in qxxqlib) for reading the data from text file using sqlloader functions. The returned data is presented as a rowsource to the consumer who invoked external table read. Now that I look into it, I don&#8217;t even see a wait event anything named &#8220;external&#8221; or ODCI related. So perhaps it&#8217;s a design flaw.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
