[progress Communities] [progress Openedge Abl] Forum Post: Index Selection Differs Between...

  • Thread starter Thread starter jbijker
  • Start date Start date
Status
Not open for further replies.
J

jbijker

Guest
We have a table called wft_activity_log with a non-unique index on process_log_obj and status_key. Now when I have the following code code and do a XREF compile (only checked under OE11.3): FIND FIRST wft_activity_log NO-LOCK WHERE (wft_activity_log.process_log_obj = 1 AND wft_activity_log.status_key = "Active") OR (wft_activity_log.process_log_obj = 1 AND wft_activity_log.status_key = "Busy"). FOR EACH wft_activity_log NO-LOCK WHERE (wft_activity_log.process_log_obj = 1 AND wft_activity_log.status_key = "Active") OR (wft_activity_log.process_log_obj = 1 AND wft_activity_log.status_key = "Busy"): DISPLAY wft_activity_log. END. The FIND FIRST surprisingly does a WHOLE-INDEX scan SEARCH mipdb.wft_activity_log xPK_wft_activity_log WHOLE-INDEX But the FOR EACH is using the correct index (2 times): SEARCH mipdb.wft_activity_log xIE1_wft_activity_log So it seems the FIND and FOR EACH doesn't follow the same rules? Anyone had the same behaviour before? And maybe an explanation of why the compiler does this?

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