In below 2 queries how big the difference will be in performance.
Option 1-
cts:search(fn:doc(),
cts:and-query((
cts:collection-query('xyz'),
cts:element-value-query(xs:QName('test'),'12344')
))
)
Option 2- specific node
cts:search(/root-node,
cts:and-query((
cts:collection-query('xyz'),
cts:element-value-query(xs:QName('test'),'12344')
))
)
PS: there are many other collections in DB.
Please guide me. Which one is better to use and how does it work in Marklogic?