Dear Dirk,
"Sounds to me like the FT index isn't hit in the long-running query. Could you please check for both queries if the index is actually used? You can do so by looking at the query plan in the info view."
Both the DBs are Text, Attribute and FT Indexed.
Please find the Timing and Query Plan output after running the query -
*Timing:* - Parsing: 0.0 ms - Compiling: 11.08 ms - Evaluating: 48729.01 ms - Printing: 16.38 ms - Total Time: 48756.49 ms
*Query plan: * <QueryPlan> <FLWR> <Let var="$items"> <List> <IterPath> <DBNode name="physicsSD" pre="0"/> <IterStep axis="child" test="*:Docs"/> <IterStep axis="child" test="*:Doc"/> </IterPath> <IterPath> <DBNode name="physicsLD" pre="0"/> <IterStep axis="child" test="*:Docs"/> <IterStep axis="child" test="*:Doc"/> </IterPath> </List> </Let> <For var="$x"> <IterFilter> <VarRef> <Var name="$items" id="0"/> </VarRef> <FTContains> <AxisPath> <IterStep axis="child" test="Info"/> <IterStep axis="child" test="Para"/> <IterStep axis="child" test="text()"/> </AxisPath> <FTWords> <Str value="emf waves" type="xs:string"/> </FTWords> </FTContains> </IterFilter> </For> <Return> <AxisPath> <VarRef> <Var name="$x" id="1"/> </VarRef> <IterStep axis="child" test="Doc"/> </AxisPath> </Return> </FLWR> </QueryPlan>
"Also it would be best to have at least some of your data, so that we can reproduce the problem. You can send the data to us directly, so we don't spam the list and if the data should not be public."
I can't provide the data publicly. I do have Christian's personal mail id. But I think he is enjoying vacations...