[snipped]
Note: SELECT F is a BASIC select, not Retrieve's (not the MV Query Language's) verb. It does not really select the file, it merely sets up for the subsequent READNEXTs to truly read the next key. So READNEXT ID;READ REC FROM F, ID involve going to the file 2x. Generally the group is still in memory when READ is requested. on a well-sized, well-behaved file several READNEXT-READ pairs will be acting on a group or groups loaded into memory only once. But is that where the inefficiency lies? Doing the READ subsequent to the READNEXT?
Actually, the BASIC SELECT is probably where you ARE spending the most time. A true SELECT generally is a single pass thru the file (assuming no indexes) creating a temporary file from which to retrieve the "next" key. The BASIC SELECT actually traverses the file structure, one key at a time, although these "reads" are via a buffer. So, the BASIC SELECT requires that each group be read into a buffer, which is then held in memory until all the keys have been scanned, at which time the NEXT group buffer is read, held and scanned, until all groups have been processed. Lots of overhead in my book.
Just my $.26 ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/