I am fetching only 14 records each time from a customer file(physical file) having milions of records. This file has 46 fields. Fetch is done in the follwoing manner, but it takes longer time -
SELECT * FROM CUSTOMER A WHERE A.CLINM1 LIKE 'B%' AND (CLINM1 <> '' OR CLIPR1 <> '') ORDER BY A.CLINM1 ASC, A.CLIPR1 ASC
This is the only one example given to shorlist clients which starts with "B". There can be different selection criteria based on differet fields from customer file.
How to improve the performance ?
One more thing noticed isfor any selection criteria, 1st fetch takes longer time than the next fetch.
AS/400 - SQLRPGLE program
December 23, 2011 5:23 AM
March 17, 2012 6:00 AM