Thanks Mike. This is helpful to know.

Tim

On 04/26/2013 12:40 AM, [email protected] wrote:
> Message: 2
> Date: Thu, 25 Apr 2013 08:42:30 -0700
> From: Michael Blakeley<[email protected]>
> Subject: Re: [MarkLogic Dev General] How to test whether doc exists
> To: MarkLogic Developer Discussion<[email protected]>
> Message-ID:<[email protected]>
> Content-Type: text/plain; charset=us-ascii
>
> In theory xdmp:exists(doc($uri)) is fastest. However it isn't update-safe 
> because it doesn't take a read lock. If you are writing update logic that 
> depends on whether or not a document exists, stick with fn:exists(doc($uri)).
>
> Speed of either will depend on many factors: whether or not the document is 
> in cache, disk performance, database size, cluster configuration, etc.
>
> -- Mike

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

Reply via email to