|
At 21:16 06/04/2002, Ray Nainy wrote: >I'm trying to explore the Best options to return the Result Set to Client >Server application. Result Set contains data from different files and with >different sort orders. We are not allowed to use the Join Logicals. So, is >there any better way to improve the processing time other than using arrays? >My goal is to minimize the processing time. Any suggestions are greatly >appreciated. Assuming that you are using ODBC or JDBC, you can use an SQL select and return it as a result set cursor. Depending on the query, I have had to resort to building a temporary result table in QTEMP and returning the result cursor from that in order to allow efficient retrieval of ancillary data and result ordering, but even then, it can still be reasonably quick. Run the queries using visual explain (or just in debug if you prefer) in order to identify any indexes that the optimizer wants. Providing them can make a major difference. If only a few rows are returned, it can help to use an OPTIMIZE clause so the optimizer knows how many rows to expect. If you can specify FOR FETCH ONLY AND WITH NC or NONE for commitment, that can help too by letting the system know it can block and doesn't need to lock rows. Pete Hall pbhall@ameritech.net http://www.ameritech.net/users/pbhall/index.html
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.