Check Oracle Query Execution Count
<p>I'm using this loop to parse XML. </p>

<pre><code>        FOR elementdetails in     
                (SELECT ExtractValue(Value(elementdetails),'/details/Id/text()') AS Id,
                        Extract(Value(elementdetails),'/details/GrpId') AS Idgrp,
                        ExtractValue(Value(elementdetails),'/details/SrCd/text()') AS PId  
           FROM TABLE(XMLSequence(Extract(Block,'/Records/Body/details)))
                       elementdetails)
</code></pre>

<p>Format of xml :</p>

<pre><code>    &lt;Records&gt;
      &lt;Body&gt;
        &lt;details&gt;
          &lt;Id&gt;1&lt;/Id&gt;
          &lt;GrpId&gt;15&lt;/GrpId&gt;
          &lt;SrCd&gt;2&lt;/SrCd&gt;
    &lt;/details&gt;
    &lt;details&gt;
          &lt;Id&gt;2&lt;/Id&gt;
          &lt;GrpId&gt;5&lt;/GrpId&gt;
          &lt;SrCd&gt;6&lt;/SrCd&gt;
    &lt;/details&gt;
         &lt;/Body&gt;
    &lt;/Records&gt;
</code></pre>

<p>After parsing I'm passing the element details values like this: <code>elementdetails.Id</code> to other procedure. 
So, in above example loop will run twice.<br/>My question is: whenever loop runs, it does the select query to parse the whole xml or only the first details tag and then the second?</p>