|
Believe it or not, this particular app uses 25 files to build the result set that is sent back. Not all files are used for all request types so each request does not open all 25 files. I found it easier (from the perspective of someone who can use SQL put I would not say I am an expert) to code this in "standard" SETLL/READs and CHAINS then some hugh complex SELECT statements. I have seen some hugh SELECT statements that work but 6 months later no one can understand. I have done a few where I build the result set into an externally defined QTEMP file then used a SELECT on the QTEMP file with the ORDER BY clause. In this case we were reusing code that already existed for a green-screen app that put the data into an array and sorted it to them be put to a subfile. Just changed the "put to the subfile" into a "put to a MODS" for the stored procedure
Jon.Paris@xxxxxxxxxxxxxx 12/15/2006 5:45 PM >>>And in this particular app I actually have an array and a MODS. I
load the array because I then sort the data before loading it into the MODS. Why not use qsort to sort the MODS directly? Or alternatively use a pointer to base the MODS on the storage used by the array? That approach would help both in terms of the memory footprint and speed since there's no need to copy the data. But why is an ORDER BY not being used in the SQL to avoid the need for sorting - or am I missing something? Jon Paris Partner400 www.Partner400.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.