[Stackoverflow] [Progress OpenEdge ABL] How can i make database access fast of progress 4gl

Status
Not open for further replies.
K

kushal bhatia

Guest
i have to make a database access fast which contains large data of unique index mstr_nbr how can i make it fast. in which get first mstr taking 0ms and get next mstr takes most of the time 0ms but sometimes takes 1ms means in 180000 for each mstr runs 12000 runs takes 1 ms which is increasing the time and if no of serial loop increases every time 12000ms second also increase this is a webspeed generated webpage how can i make it fast...anyone help

Code:
            DEFINE QUERY Mstr FOR mstr scrolling.
            OPEN QUERY Mstr FOR EACH mstr no-lock 
                        where (Mstr_status = "close" or Mstr_status = "closed")
                        QUERY-TUNING(LOOKAHEAD CACHE-SIZE 32768 DEBUG EXTENDED).
            FOR EACH serial
                WHERE (serial_pallet = f_pallet AND serial_f_chr11 <> "BOX") 
                       or (serial_key begins f_pallet)
                    NO-LOCK    BREAK BY serial_pallet by serial_parent by serial__chr11 QUERY-TUNING(LOOKAHEAD CACHE-SIZE 32768 DEBUG EXTENDED):
                GET FIRST mstr.
                define variable roID as rowid no-undo.
                roID = rowid(mstr).
                DO WHILE NOT QUERY-OFF-END('mst'):
                    for each det fields(detnbr detmodel detlot detqty) no-lock
                    where (detnbr = Mstr_nbr) and (detmodel = serial_parent and detlot = serial__chr11)
                    QUERY-TUNING(LOOKAHEAD CACHE-SIZE 32768 DEBUG EXTENDED):
                        tinspected = tinspected + detqty.
                    end. /* for each */
                    GET NEXT mstr.
                END.
                reposition mstr to rowid roID.
            end.

Continue reading...
 
Status
Not open for further replies.
Top