Hi,
We have been following up with our on going performance problems and we
found that we are looking up a bunch of documents in Marklogic and then
doing an XPath equals on each of them to find all the nodes that match a
contributor, the query is:
declare namespace npg="....";
declare namespace rdf="....";
let $uri := cts:uri-match('*blah*')
let $record := doc($uri)
let $article := $record//semantic-metadata/graph/rdf:RDF/npg:Article
let $contributors := $article/npg:hasContributor/@rdf:resource
return $record//semantic-metadata/graph/rdf:RDF/npg:Contributor[@rdf:about
eq $article/npg:hasContributor/@rdf:resource]
The number of contributors in the above case where 3054 so I am looking up
all the contributor nodes (which could be more) in the document and
matching any of the 3054.
My understanding is that we are not doing a search but instead loading
the whole document and doing a comparison on all the contributor nodes
hence adding any indexes is not going to help? Or is there a smarter
way of doing this that I don't know about? Any help would appreciated,
these sort of queries are really killing our MarkLogic cluster.
One other option would be potentially move this outside of xquery and
do in the app rather than using up Marklogic resources which could be
used for search queries instead.
Thanks,
Basu
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general