<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-CA;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Comic Sans MS";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Comic Sans MS&quot;">Thank you for the tip. I&#8217;ve updated my problem QTP program to use both. It was taking 150 minutes. With the changes it now runs in less than 8 minutes!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Comic Sans MS&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Comic Sans MS&quot;">As I always tell the young folks at work: OpenVMS and Powerhouse just keep working.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Comic Sans MS&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Comic Sans MS&quot;">Cheers, Arnold<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Comic Sans MS&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Herald.Kaffka@westfraser.com [mailto:Herald.Kaffka@westfraser.com]
<br>
<b>Sent:</b> Tuesday, 24 September, 2013 05:11<br>
<b>To:</b> Ken Langendock<br>
<b>Cc:</b> Arnold Chan; 'powerh-l'; powerh-l-bounces&#43;herald.kaffka=westfraser.com@lists.sowder.com<br>
<b>Subject:</b> RE: QTP reads every row instead of using index?<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">I think of it as this way:</span>
<br>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Select = Tell the database to send me all rows, that I may throw away the ones that I don't want.</span>
<br>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Choose = Tell the database to send me the rows that match the following the criteria.</span>
<br>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">You can mix the two, choose something simple and selective, and select on something complex.</span>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Basic rule is that choose happens down in the database layer, while selects happen in the Powerhouse layer.</span>
<br>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">(running as much as possible in the database layer is usually more efficient).</span>
<br>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">So yes, choose where possible, and save the selects for more complex expressions....</span>
<br>
<br>
<br>
<br>
<br>
<span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">From: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Ken Langendock &lt;<a href="mailto:ken.langendock@rogers.com">ken.langendock@rogers.com</a>&gt;</span>
<br>
<span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">To: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">&quot;'Arnold Chan'&quot; &lt;<a href="mailto:Chan@camosun.bc.ca">Chan@camosun.bc.ca</a>&gt;, &quot;'powerh-l'&quot; &lt;<a href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</a>&gt;,
</span><br>
<span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">Date: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">09/23/2013 06:19 PM</span>
<br>
<span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">Subject: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">RE: QTP reads every row instead of using index?</span>
<br>
<span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">Sent by: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">&lt;<a href="mailto:powerh-l-bounces&#43;herald.kaffka=westfraser.com@lists.sowder.com">powerh-l-bounces&#43;herald.kaffka=westfraser.com@lists.sowder.com</a>&gt;</span>
<o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="3" width="100%" noshade="" style="color:#A0A0A0" align="center">
</div>
<p class="MsoNormal"><br>
<br>
<br>
<tt><span style="font-size:10.0pt">When using an SQL database, stop using SELECT and CHOOSE everything.</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<br>
<tt>&gt; RUN ECE_TEST</tt><br>
<tt>&gt; REQUEST ECE_TEST1</tt><br>
<tt>&gt; ACCESS CON8 IN IFAS_DB</tt><br>
<tt>&gt; SET LIST SQL</tt><br>
<tt>&gt; CHOOSE BCSAPFOS_ID &quot;XDG1&quot;</tt><br>
<tt>&gt; output con8 in ifas_db update</tt><br>
<tt>&gt; item bcsapfos_id = &quot;XDG1&quot;</tt><br>
<tt>&gt; GO</tt><br>
<br>
<tt>-----Original Message-----</tt><br>
<tt>From: <a href="mailto:powerh-l-bounces&#43;ken.langendock=rogers.com@lists.sowder.com">
powerh-l-bounces&#43;ken.langendock=rogers.com@lists.sowder.com</a></tt><br>
<tt>[</tt></span><a href="mailto:powerh-l-bounces&#43;ken.langendock=rogers.com@lists.sowder.com"><tt><span style="font-size:10.0pt">mailto:powerh-l-bounces&#43;ken.langendock=rogers.com@lists.sowder.com</span></tt></a><tt><span style="font-size:10.0pt">] On</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<tt>Behalf Of Arnold Chan</tt><br>
<tt>Sent: Monday, September 23, 2013 7:13 PM</tt><br>
<tt>To: 'powerh-l'</tt><br>
<tt>Subject: QTP reads every row instead of using index?</tt><br>
<br>
<tt>Hello,</tt><br>
<br>
<tt>We're running PH 8.40d with Oracle8i (really) on OpenVMS. We have a problem</tt><br>
<tt>with QTP. It correctly applies the SELECT criteria but it does so by reading</tt><br>
<tt>every row in the table instead of using the index. Unfortunately something I</tt><br>
<tt>can't get SET LIST SQL to show anything either. Here is my test results are</tt><br>
<tt>below. I have a index on the bcsapfos_id column but it insists on reading</tt><br>
<tt>every row. Its not a problem in my test data with 643 rows but the</tt><br>
<tt>production table is much larger.</tt><br>
<br>
<tt>The index couldn't be more straightforward. I tried using a plain b-tree</tt><br>
<tt>index too. It did not make a difference.</tt><br>
<tt>CREATE BITMAP INDEX con8_idx2 ON con8 (bcsapfos_id);</tt><br>
<br>
<tt>Any assistance would be *greatly* appreciated.</tt><br>
<br>
<tt>Regards,</tt><br>
<tt>Arnold Chan,</tt><br>
<tt>Registrar's Office,</tt><br>
<tt>Camosun College</tt><br>
<br>
<br>
<tt>&gt; RUN ECE_TEST</tt><br>
<tt>&gt; REQUEST ECE_TEST1</tt><br>
<tt>&gt; ACCESS CON8 IN IFAS_DB</tt><br>
<tt>&gt; SET LIST SQL</tt><br>
<tt>&gt; SELECT CON8 IF (BCSAPFOS_ID = &quot;XDG1&quot;)</tt><br>
<tt>&gt; output con8 in ifas_db update</tt><br>
<tt>&gt; item bcsapfos_id = &quot;XDG1&quot;</tt><br>
<tt>&gt; GO</tt><br>
<tt>Executing request ECE_TEST1 ...</tt><br>
<tt>Records read:</tt><br>
<tt>&nbsp;CON8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;643</tt><br>
<tt>Transactions processed: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4</tt><br>
<tt>Records processed: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Added &nbsp; &nbsp;Updated &nbsp;Unchanged &nbsp; &nbsp;Deleted</tt><br>
<tt>&nbsp;CON8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0</tt><br>
<tt>Finished.</tt><br>
<br>
<tt>---</tt><br>
<tt>--</tt><br>
<tt>= = = = = = = = = = = = = = = = = = = = = = = = = = = =</tt><br>
<tt>Mailing list: <a href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</a></tt><br>
<tt>Subscribe: 'subscribe' in message body to <a href="mailto:powerh-l-request@lists.sowder.com">
powerh-l-request@lists.sowder.com</a></tt><br>
<tt>Unsubscribe: 'unsubscribe &amp;lt;password&amp;gt;' in message body to</tt><br>
<tt><a href="mailto:powerh-l-request@lists.sowder.com">powerh-l-request@lists.sowder.com</a></tt><br>
</span><a href="http://lists.sowder.com/mailman/listinfo/powerh-l"><tt><span style="font-size:10.0pt">http://lists.sowder.com/mailman/listinfo/powerh-l</span></tt></a><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<tt>This list is closed, thus to post to the list you must be a subscriber.</tt><br>
<tt>Add 'site:lists.sowder.com powerh-l' to your search terms to search the list</tt><br>
<tt>archive at Google.</tt><br>
<br>
<tt>--</tt><br>
<tt>= = = = = = = = = = = = = = = = = = = = = = = = = = = =</tt><br>
<tt>Mailing list: <a href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</a></tt><br>
<tt>Subscribe: 'subscribe' in message body to <a href="mailto:powerh-l-request@lists.sowder.com">
powerh-l-request@lists.sowder.com</a></tt><br>
<tt>Unsubscribe: 'unsubscribe &amp;lt;password&amp;gt;' in message body to <a href="mailto:powerh-l-request@lists.sowder.com">
powerh-l-request@lists.sowder.com</a></tt><br>
</span><a href="http://lists.sowder.com/mailman/listinfo/powerh-l"><tt><span style="font-size:10.0pt">http://lists.sowder.com/mailman/listinfo/powerh-l</span></tt></a><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<tt>This list is closed, thus to post to the list you must be a subscriber.</tt><br>
<tt>Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.</tt><br>
<br>
</span><br>
<br>
<br>
---------------------------- <br>
This e-mail message and any attachments are confidential. Any dissemination or use of this information by a person other than the intended recipient is unauthorized. If you are not the intended recipient, please notify me by return e-mail, do not open any attachment
 and delete this communication and any copy. Thank you <o:p></o:p></p>
</div>
</body>
</html>