|
Ravi At 01:28 PM 6/18/1998 -0500, you wrote: >Rick, > >That is a good point. I did not try that. Maybe it retrieves a page >worth of records at a time and tht's why the first query was faster. Usually, the query engine retrives 2 screens of records. This is like *FIRSTIO on OPNQRYF. So, you can roll down one page before more records need to be retrieved. After this, records are retrieved in full blocks, 32k in size, I think. You can affect the optimization process by using the 'OPTIMIZE FOR nnn ROWS' clause at the end of your SQL statement. I think 'OPTIMIZE FOR 1 ROW' is like *FIRSTIO, 'OPTIMIZE FOR 9999 ROWS' is like *ALLIO. You can get suggestions for improving performance of SQL by running CHGQRYA QRYTIMLMT(0) and STRDBG When the message about exceeding the time limit appears, take the 'C' option. Then look at you job log. There'll be lots of messages about what the optimizer did and what would work better. HTH Vernon Hamberg Systems Software Programmer Old Republic National Title Insurance Company 400 Second Avenue South Minneapolis, MN 55401-2499 (612) 371-1111 x480 +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.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.