Hi All,

What is the fastest way to test for existence of a document in the 
database?

This is the fastest way I know:

let $URI := "/path/to/doc.xml"
return exists(doc($URI))

It takes about 75 us (microseconds) to return an answer according to the 
profile tab of qconsole.

Best,

Tim Finney
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to