Hi, everyone
I used document below:
<root>...<name>some text</name>...</root>
The scenario is as below:
3467 documents in the container
Select the document whoes name node's content equals to some text. Use two ways, one is XQuery, and the other is use XmlIndexLookup directly. The XQuery I used is
for $i in collection() where $i//name[.='some text'] return $i
The test process is as below:
1. without index on node name, the query takes 8860ms to finish.
2. with index on node name, the query takes 893ms to finish.
3. with index on node name, the index lookup takes 1451ms to finish.
So, the result is not what I expected. I think use the index lookup will be faster than XQuery.
Any idears?
Regards
Jhon Kao