|
Hi All, I was having a discussion with a fellow RPG programmer on the merits of using SQL vs. a READ command in RPG. Can someone tell me about their experiences with using SQL over an RPG read command in terms of performance? Let me give you an example - we have a physical file that contains over 100,000 records. We have a program that searches from a "FROM" date and reads to either the end of the file or the "TO" date, whichever comes first. The program that does the READ statement uses a logical file. The SQL statement uses a BETWEEN parameter to only select those records that match the indicated criteria. >From what understand, there would be a disk I/O for every record it needs to read between the FROM and TO dates. However, with an SQL SELECT statement, I would only encounter a single disk I/O. Is this correct? In the case of this above program, which is the most efficient way of getting the data? Thanks! Brian. -=-=-=-=-=-=-=-=-=-=-=-=-=- Brian Piotrowski Specialist - I.T. Simcoe Parts Service, Inc. Ph: 705-435-7814 x343 Fx: 705-435-6746 bpiotrowski@xxxxxxxxxxxxxxx -=-=-=-=-=-=-=-=-=-=-=-=-=-
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.