Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query Performance Comparison between XQuery and XmlIndexLookup

637843May 18 2008 — edited May 27 2008

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2008
Added on May 18 2008
6 comments
1,524 views