I have the following three queries I am comparing declare variable $my:col as xs:string...(:let $ait := collection()[.//myelem="myval"] :) (: let $ait := collection($mycol)/aaa[.//myelem="myval"] :)
let $ait := collection($mycol)[.//myelem=" myval"] return $ait//someelem There may be 10mil total documents in the repository. There may be 1mil documents that have root element of aaa. Note:myelem can/should only be in documents with root element of aaa There may be 3 mil total documents that are in mycol There may be at most 100k documents that have root element of aaa which are in mycol The following are the query-trace for the above three statement: 1st one: roughly 3000 fragments to filter. Seems reasonable aaa documents that have myelem = myval 2nd statement: roughly 1000 fragments to filter. Seems reasonable - narrowing the search Last statement: roughly 8 mil fragments to filter. Not certain why this occurs. Any explanation to shed some light?
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
