openedge - What would be the most efficient way of using 'BREAK BY' in a nested for each in Progress 4GL? -
assume there 4 tables grouph, groupl, member, incident. if write nested each below,
for each grouph use-index grouph-id no-lock, each groupl use-index groupl-id groupl.grphid = grouph.grphid no-lock, each member use-index member-id member.memberid = groupl.memberid no-lock, each incident use-index incident-key incident.memberid = member.memberid no-lock break member.memberid member.schemid member.emplid: //do something. end.
what facts can make query inefficient in relation 'break by' fields?
the biggest positive change can make rid of use-index phrases restricts db engine 1 index , prohibits index bracketing.
beyond that, if eachs least amount of data greatest amount of data, these fine.
Comments
Post a Comment