<font size=2 face="sans-serif">(Had to trim most of the history, size
of this message thread of was getting too big for this list...).</font>
<br>
<br><font size=2 face="sans-serif">========================================================================</font>
<br>
<br><font size=2 face="sans-serif">I also seem to remember something about
"select file if" conditions short circuiting the build of a record
complex,</font>
<br><font size=2 face="sans-serif">(Select File if was supposed to kick
in as soon as the file entered the record complex, and would prevent PH
from</font>
<br><font size=2 face="sans-serif">growing the record complex with unneeded
records, while select was evaluated "after all records were
retreived").</font>
<br>
<br><font size=2 face="sans-serif">Don't know if this is an urban
legend, an relic of an early PH version, or if there some truth to it...</font>
<br>
<br><font size=2 face="sans-serif">To this day, (If I'm not working with
a cursor), I still tend to </font>
<br><font size=2 face="sans-serif">"Choose" on the primary file,
</font>
<br><font size=2 face="sans-serif">select file if as soon as possible on
the other files in the access list (esp if selecting on some field condition
in just that file such as "select inventory_balance if status of inventory_balance
= "A").</font>
<br><font size=2 face="sans-serif">and run a final select on cross table
fields at the bottom. </font>
<br>
<br><font size=2 face="sans-serif">Don't know if really more efficient
or not (at one time I was told it was), but it does tend to make
the logic on a large ugly join a little clearer (at least to me).</font>
<br><font size=2 face="sans-serif">I'm not likely to change my style at
this point, but I do idly wonder if "I'm right" or if it's just
a "Crusty Old Guy" thing... </font>
<br>
<br><font size=2 face="sans-serif">(Or if the answer is like all good fairy
tales and begins "once upon a time" this was correct, but after
version x it doesn't matter any more...).</font>
<br>
<br><font size=2 face="sans-serif">===========================================================================</font>
<br>
<br>
<br><font size=3>Thanks!</font>
<br>
<br><font size=3>A+</font>
<br>
<br><font size=3>Etienne</font>
<br>
<br><font size=2 face="sans-serif">============================================================================</font>
<br>
<br><font size=2 face="sans-serif">Think first, reply later. (gotta
remember that rule).</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
There is/was an advantage to using Choose (or choose with select) on RMS/ISAM.</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
The choose (which can only operate on the initial file on the access statement),
can limit the size of the data set which <br>
is processed. (You have to be choosing an indexed item, only items
which match the choose criteria are driven down</font><font size=3> </font><font size=2 face="sans-serif"><br>
into the link x of table a to y of table b logic). With just a select,
all of table A will be read, POWERHOUSE will apply the</font><font size=3>
</font><font size=2 face="sans-serif"><br>
select, and then use that to drive out the the other tables in the Join.
If table A is very big, and the select is very selective,</font><font size=3>
</font><font size=2 face="sans-serif"><br>
this can be a big difference, (read a million records, throw out the ones
before yesterday, link the remaining 2000 records</font><font size=3> </font><font size=2 face="sans-serif"><br>
into a results set, as opposed to reading 2000 rows since yesterday (choose
date(days(sysdate)-1)) and building the complex...</font><font size=3>
<br>
<br>
</font>
<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