JamesBowen
19+ years progress programming and still learning.
Hi All
I don normally have problems with indexes but I am coming up with one I am not sure how to fix.
I did not realize that you cannot use the "use-index" option on a query prepare string so what is happening is Progress is picking up the wrong index.
PRESELECT EACH Contacts NO-LOCK WHERE Contacts.ID_members EQ 401 AND LOOKUP(Contacts.contact_status,"N,U") NE 0 BY Contacts.first_name BY Contacts.last_name
So my question is what index should I create to match the query above?
The current index I want the query to use goes like this:
idxContactStatus
idxIDMembers
James.
I don normally have problems with indexes but I am coming up with one I am not sure how to fix.
I did not realize that you cannot use the "use-index" option on a query prepare string so what is happening is Progress is picking up the wrong index.
PRESELECT EACH Contacts NO-LOCK WHERE Contacts.ID_members EQ 401 AND LOOKUP(Contacts.contact_status,"N,U") NE 0 BY Contacts.first_name BY Contacts.last_name
So my question is what index should I create to match the query above?
The current index I want the query to use goes like this:
idxContactStatus
ID_members
contact_status
This is the index that is being used.contact_status
idxIDMembers
ID_Members
Many Help Thanks.
James.