kushalbhatia169
New Member
hello everyone,
i have to make a database access fast which contains large data of unique index mstr_nbr how index 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 increases can anyone help this is a webspeed generated webpage how can i make it fast...anyone help
i have to make a database access fast which contains large data of unique index mstr_nbr how index how can i make it fast.
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 fields(serial_key serial_parent serial_pallet serial__chr06 serial__chr07 serial__chr08 serial__chr09 serial__chr10 serial__chr11 serial__chr12 serial__chr12 serial__chr13
serial__chr14 serial__chr15 serial__chr16 serial__int02 serial__int06 serial__int07 serial__int08 serial__int09 serial__int10)
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.
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 increases can anyone help this is a webspeed generated webpage how can i make it fast...anyone help
Last edited by a moderator: