<font size=2 face="sans-serif">I think of it as this way:</font>
<br>
<br><font size=2 face="sans-serif">Select = Tell the database to send me
all rows, that I may throw away the ones that I don't want.</font>
<br>
<br><font size=2 face="sans-serif">Choose = Tell the database to send me
the rows that match the following the criteria.</font>
<br>
<br><font size=2 face="sans-serif">You can mix the two, choose something
simple and selective, and select on something complex.</font>
<br><font size=2 face="sans-serif">Basic rule is that choose happens down
in the database layer, while selects happen in the Powerhouse layer.</font>
<br>
<br><font size=2 face="sans-serif">(running as much as possible in the
database layer is usually more efficient).</font>
<br>
<br><font size=2 face="sans-serif">So yes, choose where possible, and save
the selects for more complex expressions....</font>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Ken Langendock &lt;ken.langendock@rogers.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">&quot;'Arnold Chan'&quot;
&lt;Chan@camosun.bc.ca&gt;, &quot;'powerh-l'&quot; &lt;powerh-l@lists.sowder.com&gt;,
</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">09/23/2013 06:19 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">RE: QTP reads
every row instead of using index?</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">&lt;powerh-l-bounces+herald.kaffka=westfraser.com@lists.sowder.com&gt;</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>When using an SQL database, stop using SELECT and
CHOOSE everything.<br>
<br>
&gt; RUN ECE_TEST<br>
&gt; REQUEST ECE_TEST1<br>
&gt; ACCESS CON8 IN IFAS_DB<br>
&gt; SET LIST SQL<br>
&gt; CHOOSE BCSAPFOS_ID &quot;XDG1&quot;<br>
&gt; output con8 in ifas_db update<br>
&gt; item bcsapfos_id = &quot;XDG1&quot;<br>
&gt; GO<br>
<br>
-----Original Message-----<br>
From: powerh-l-bounces+ken.langendock=rogers.com@lists.sowder.com<br>
[</font></tt><a href="mailto:powerh-l-bounces+ken.langendock=rogers.com@lists.sowder.com"><tt><font size=2>mailto:powerh-l-bounces+ken.langendock=rogers.com@lists.sowder.com</font></tt></a><tt><font size=2>]
On<br>
Behalf Of Arnold Chan<br>
Sent: Monday, September 23, 2013 7:13 PM<br>
To: 'powerh-l'<br>
Subject: QTP reads every row instead of using index?<br>
<br>
Hello,<br>
<br>
We're running PH 8.40d with Oracle8i (really) on OpenVMS. We have a problem<br>
with QTP. It correctly applies the SELECT criteria but it does so by reading<br>
every row in the table instead of using the index. Unfortunately something
I<br>
can't get SET LIST SQL to show anything either. Here is my test results
are<br>
below. I have a index on the bcsapfos_id column but it insists on reading<br>
every row. Its not a problem in my test data with 643 rows but the<br>
production table is much larger.<br>
<br>
The index couldn't be more straightforward. I tried using a plain b-tree<br>
index too. It did not make a difference.<br>
CREATE BITMAP INDEX con8_idx2 ON con8 (bcsapfos_id);<br>
<br>
Any assistance would be *greatly* appreciated.<br>
<br>
Regards,<br>
Arnold Chan,<br>
Registrar's Office,<br>
Camosun College<br>
<br>
<br>
&gt; RUN ECE_TEST<br>
&gt; REQUEST ECE_TEST1<br>
&gt; ACCESS CON8 IN IFAS_DB<br>
&gt; SET LIST SQL<br>
&gt; SELECT CON8 IF (BCSAPFOS_ID = &quot;XDG1&quot;)<br>
&gt; output con8 in ifas_db update<br>
&gt; item bcsapfos_id = &quot;XDG1&quot;<br>
&gt; GO<br>
Executing request ECE_TEST1 ...<br>
Records read:<br>
 &nbsp;CON8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;643<br>
Transactions processed: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4<br>
Records processed: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Added &nbsp;
&nbsp;Updated &nbsp;Unchanged &nbsp; &nbsp;Deleted<br>
 &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<br>
Finished.<br>
<br>
---<br>
--<br>
= = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
Mailing list: powerh-l@lists.sowder.com<br>
Subscribe: 'subscribe' in message body to powerh-l-request@lists.sowder.com<br>
Unsubscribe: 'unsubscribe &amp;lt;password&amp;gt;' in message body to<br>
powerh-l-request@lists.sowder.com<br>
</font></tt><a href="http://lists.sowder.com/mailman/listinfo/powerh-l"><tt><font size=2>http://lists.sowder.com/mailman/listinfo/powerh-l</font></tt></a><tt><font size=2><br>
This list is closed, thus to post to the list you must be a subscriber.<br>
Add 'site:lists.sowder.com powerh-l' to your search terms to search the
list<br>
archive at Google.<br>
<br>
--<br>
= = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
Mailing list: powerh-l@lists.sowder.com<br>
Subscribe: 'subscribe' in message body to powerh-l-request@lists.sowder.com<br>
Unsubscribe: 'unsubscribe &amp;lt;password&amp;gt;' in message body to
powerh-l-request@lists.sowder.com<br>
</font></tt><a href="http://lists.sowder.com/mailman/listinfo/powerh-l"><tt><font size=2>http://lists.sowder.com/mailman/listinfo/powerh-l</font></tt></a><tt><font size=2><br>
This list is closed, thus to post to the list you must be a subscriber.<br>
Add 'site:lists.sowder.com powerh-l' to your search terms to search the
list archive at Google.<br>
<br>
</font></tt>
<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