Unless you know the keys to the records you're selecting, even the EXECUTE "SELECT ..." is going to have to read each record, how else would it know which records to throw out?
My point is, if one of your selection criteria were in the key, then my method bypasses the need to read the record if the key element fails its test. I concede the sort, however some relatively simple 'table' management can easily remedy that. -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Tuesday, October 25, 2011 4:53 PM To: U2 Users List Subject: Re: [U2] UniBasic Question >> Dave >> The next-to-last one may depend on Unidata vs. Universe. I >> understand that Unidata only 'fetches' the key in the READNEXT while >> I believe Universe grabs both the key and record, due to the >> construct of the database. I believe that is the case in Unidata. A SELECT returns a list of IDs. That's why your recommendation was confusing me. In the Unidata environment, I would have to read every record in order to apply the filter in the loop. In a case where only a few records are selected from a large file, this would create a lot of unnecessary disk activity. Also, you would not be able to SORT the order of the IDs. Charles Shaffer Senior Analyst NTN-Bower Corporation _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users