Hi,
I have a beginner's question regarding indexing: As far as I understand,
MarkLogic indexes all data according to global indexing rules. Thus, in
general, all accesses to data should be "fast" when the universal index can
be used.
I am trying to combine data from two XML files into a report, and
throughput is not sufficient. I'm now looking for ways to improve the
performance of my XQuery, either by adding indexes to MarkLogic or by
improving the query so that it runs faster. Here's what I have:
for $key in doc("file1.xml")/a/b/c/d/e/f/g/h/i[j = 123]/k/text()
let $data-from-file-2 := doc("file2.xml")/a/b[c/d = $key]/e/f/text()
return
<pre>
$key => $data-from-file-2
</pre>
Thus, I'm iterating over some subset of the nodes in file1.xml, selecting
data from file2.xml for each of the nodes selected. Both file1.xml and
file2.xml are in a files residing in MarkLogic. They have a pre-determined
format and contain roughly 100,000 elements matching each of the two paths.
It seems that the performance of the second of the two XPaths
(doc("file2.xml")/a/b[c/d = $key]/e/f/text()) is most important. Ideally,
I would like this lookup to complete in under a millisecond, but it seems
to need 75ms right now.
Any help speeding this up would be greatly appreciated!
Thanks,
Hans
--
LambdaWerk GmbH
Oranienburger Straße 87/89
10178 Berlin
Phone: +49 30 555 7335 0
Fax: +49 30 555 7335 99
HRB 169991 B Amtsgericht Charlottenburg
USt-ID: DE301399951
Geschäftsführer: Hans Hübner
http://lambdawerk.com/
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general