|
One more thing to consider. If this is a one off report, the easiest to code approach is probably the best unless performance is abysmal. If it's a regular production job it kind of depends on how long both take. If the run time is in hours it's probably worth optimizing it. If it's in minutes both ways it depends on how frequently it's run and whether users are waiting with bated breath. I wish I could remember the break even point between random and sequential I/O, but I know it's completely counter intuitive. <><><>-----Original Message----- <><><>From: rpg400-l-bounces@xxxxxxxxxxxx <><><>[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tom Liotta <><><>Sent: Thursday, August 18, 2005 5:04 PM <><><>To: rpg400-l@xxxxxxxxxxxx <><><>Subject: RE: a need for speed <><><> <><><>AFAIK, Booth's method would "work", but Scott's _could_ <><><>easily be faster. The ordering would be the same for both <><><>and grouping would be defined the same. Scott <><><>positions-to and READs the first and last record in every <><><>group giving lowest and highest suffix (as long as <><><>ordering and grouping are correct) in the group. Booth's <><><>method would give the lowest suffix at L1-Detail time and <><><>the highest at L1-Total time. <><><> <><><>However, Scott has a point when the average number of <><><>records in groups exceeds some number. If records are <><><>1000 bytes in size and groups average say 50000 records, <><><>then maybe it's not such a good idea to read individual <><><>records. But if groups average 5 records, then it hardly <><><>matters whether records are all read or not -- most will <><><>be physically read anyway and there'll be no READPs nor <><><>any other complicating code paths internally. <><><> <><><>Tom Liotta <><><> <><><>rpg400-l-request@xxxxxxxxxxxx wrote: ***************************** NOTICE: All e-mail sent to or from this e-mail address will be received or otherwise recorded by The Sharper Image corporate e-mail system and is subject to archival, monitoring, and review by and/or disclosure to Sharper Image security and other management. This message is intended only for the use of the addressee and may contain information that is privileged and confidential. The contents of this message may contain personal views which are not the views of The Sharper Image. If you are not the intended recipient, dissemination of this communication is prohibited. *****************************
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.