I have a set of "summary" documents and want to use a collection from each
document to group a set of detail documents (which may or may not be loaded).
As an experiment I'm listing all the summary documents with some stats, and
then printing true/false if the collection exists (presumably meaning documents
have been loaded for that collection.
For simplicity I'm using the URI of the summary document to be the collection
name for the details.
My first attempt was :
for $m in ...
return ....
exists( cts:collection-match($m/base-uri()) )
With a result set of about 100 documents ($m) this took > 20 seconds !
I changed it to
exists( cts:collection ($m/base-uri()) )
and now it takes 3 seconds
The 3 seconds is really doing all the other work. But only changing that one
line is a 17 sec difference.
Any ideas why such a performance difference ? I would have thought
cts:collection-match() would be more efficient ... as it should use the
collections lexicon.
(I checked and the collection lexicon is turned on).
----------------------------------------
David A. Lee
Senior Principal Software Engineer
Epocrates, Inc.
[email protected]<mailto:[email protected]>
812-482-5224
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general