Hi all
We have a rather complex search site that searches in multiple tables. The query for this search is buildt up dynamiclly, then executed and the result is returned to a .NET site as xml. (I use appserver for calling the search and returning the search result).
Sometimes a user creates a search where every criteria has multiple values. My "query-builder" ends up with this:
(there are index on both WorkFlowDefinitionID, QWorkFlowItemName and GroupAssigned)
As you can see i use lookup since there are more then one values. This is a very slow query. On our system, 45 sec. If i rewrite and use and (...or ....or ...or) and (...or ...or ...or ) it is still slow. Around 25 sec.
I have tried to set use-index xxxx for this search, but that dosn't help.
Is there a way to speed things up here ? How can i get progress to use correct index here ?
I need a solution when every criteria has multiple values.
Thank you.
Lars E.
We have a rather complex search site that searches in multiple tables. The query for this search is buildt up dynamiclly, then executed and the result is returned to a .NET site as xml. (I use appserver for calling the search and returning the search result).
Sometimes a user creates a search where every criteria has multiple values. My "query-builder" ends up with this:
Code:
for each Activity no-lock
where index(string(activity.a-closecode),"0,1") > 0
and lookup(string(activity.WorkFlowDefinitionID), "7621e6f7-4398-453a-b424-dcaeb26b6c39,aa9a25f8-0202-4f7e-8d41-4c0977b02792,b890ed0d-29ec-43e8-84ba-06ed1ae17724") > 0
and lookup(activity.QWorkFlowItemName, "UL Close,UL Complete") > 0
and lookup(activity.GroupAssigned, "Feso AS,Tel2Cel") > 0:
end.
As you can see i use lookup since there are more then one values. This is a very slow query. On our system, 45 sec. If i rewrite and use and (...or ....or ...or) and (...or ...or ...or ) it is still slow. Around 25 sec.
I have tried to set use-index xxxx for this search, but that dosn't help.
Is there a way to speed things up here ? How can i get progress to use correct index here ?
I need a solution when every criteria has multiple values.
Thank you.
Lars E.