"Adrian Matthews" <[EMAIL PROTECTED]> wrote on 11/11/2004 10:26:48 AM:
> It's something I've always done over the last twenty years. The select > processor in theory should apply optimisiation but I always break my > statements down to reduce the working record set and to increase readability. > > Makes very little difference on smaller amount of records but makes a huge > difference when record counts get into the millions, especially on distributed > files or selects which work on a mixture of non-indexed and indexed fields. Of course, like so many things in the MV world (and life in general) this is an "it depends" scenario. If you're selecting based on three fields that reside in the record, the additional overhead of comparing them will be negligible compared to making a second pass through. It also depends on whether one of the criteria would be expected to reduce the working set of records significantly. If so, a second pass may be worth it. If you can reduce the working set significantly by selecting on a resident field, and save a nasty translate for a small percentage of the entire file, a two-pass approach is almost a no-brainer. But if the resident field only pares out 10% of the records, you'll be passing through 90% of the file twice, and you have to determine whether the second pass is saving work or creating more. With a particularly nasty dictionary item, it may be worth it. Tim Snyder IBM Information Management Consulting I/T Specialist , U2 Professional Services ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/