Thanks very much. I should have said we are on 4.2. I'll assume that Mike's comment that "It looks to me like doc-available($uri) is equivalent to xdmp:exists(doc($uri)) now" applies to 4.2 also and not just 5.0 unless I hear otherwise...not sure how I would verify that myself. I don't have access to prod so that's why I can't simply test this. Thanks again.
David On Thu, Mar 1, 2012 at 4:51 PM, <[email protected]>wrote: > Send General mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://developer.marklogic.com/mailman/listinfo/general > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of General digest..." > > > Today's Topics: > > 1. Is fn:doc-available() high performance, or should we use > something else like cts:uri-match()? (David Swearingen) > 2. Re: Is fn:doc-available() high performance, or should we use > something else like cts:uri-match()? (Danny Sokolsky) > 3. Re: Is fn:doc-available() high performance, or should we use > something else like cts:uri-match()? (Michael Blakeley) > 4. cts:element-query 3rd parameter? (William Merritt Sawyer) > 5. Re: Is fn:doc-available() high performance, or should we use > something else like cts:uri-match()? (Danny Sokolsky) > 6. Re: element-query 3rd parameter? (Danny Sokolsky) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 1 Mar 2012 16:15:20 -0500 > From: David Swearingen <[email protected]> > Subject: [MarkLogic Dev General] Is fn:doc-available() high > performance, or should we use something else like cts:uri-match()? > To: [email protected] > Message-ID: > <CAG-P1=RSJ0PCgZq4X2UR8eRTR2CXgW+dYjUYKDY=qe69mgk...@mail.gmail.com > > > Content-Type: text/plain; charset="iso-8859-1" > > We have a system with a million or so records. When attempting to discern > if a doc with a given uri is in the system, what's the fastest method? > Thanks. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://developer.marklogic.com/pipermail/general/attachments/20120301/4f2ff09a/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Thu, 1 Mar 2012 13:25:25 -0800 > From: Danny Sokolsky <[email protected]> > Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high > performance, or should we use something else like cts:uri-match()? > To: MarkLogic Developer Discussion <[email protected]> > Message-ID: > <c9924d15b04672479b089f7d55ffc1322261f34...@exchg-be.marklogic.com> > Content-Type: text/plain; charset="us-ascii" > > xdmp:exists(fn:doc("/my/uri.xml")) > > will be fast. > > The uri lexicon functions are also a good choice. > > -Danny > > > > From: [email protected] [mailto: > [email protected]] On Behalf Of David Swearingen > Sent: Thursday, March 01, 2012 1:15 PM > To: [email protected] > Subject: [MarkLogic Dev General] Is fn:doc-available() high performance, > or should we use something else like cts:uri-match()? > > We have a system with a million or so records. When attempting to discern > if a doc with a given uri is in the system, what's the fastest method? > Thanks. > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://developer.marklogic.com/pipermail/general/attachments/20120301/a9cef056/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Thu, 1 Mar 2012 13:30:47 -0800 > From: Michael Blakeley <[email protected]> > Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high > performance, or should we use something else like > cts:uri-match()? > To: MarkLogic Developer Discussion <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > It looks to me like doc-available($uri) is equivalent to > xdmp:exists(doc($uri)) now. Either expression results in a simple > list-cache lookup, with no tree fetches and no reliable difference in > elapsed-time. > > If you use a uri lexicon, probably something like exists(cts:uris($uri, > 'limit=1')) will be faster than cts:uri-match($uri). But I think there > might be cases where doc-available is cached and the lexicon lookup is not, > so the lexicon lookup may not always be faster than doc-available. > > -- Mike > > On 1 Mar 2012, at 13:25 , Danny Sokolsky wrote: > > > xdmp:exists(fn:doc("/my/uri.xml")) > > > > will be fast. > > > > The uri lexicon functions are also a good choice. > > > > -Danny > > > > > > > > From: [email protected] [mailto: > [email protected]] On Behalf OfDavid Swearingen > > Sent: Thursday, March 01, 2012 1:15 PM > > To: [email protected] > > Subject: [MarkLogic Dev General] Is fn:doc-available() high performance, > or should we use something else like cts:uri-match()? > > > > We have a system with a million or so records. When attempting to > discern if a doc with a given uri is in the system, what's the fastest > method? Thanks. > > > > > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > > > > ------------------------------ > > Message: 4 > Date: Thu, 1 Mar 2012 21:33:45 +0000 > From: William Merritt Sawyer <[email protected]> > Subject: [MarkLogic Dev General] cts:element-query 3rd parameter? > To: "[email protected]" > <[email protected]> > Message-ID: > <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > I am finding cts:element-query has an optional third parameter but I am > finding no documentation mentioning it. Can anyone tell me what this third > parameter is and purpose? > Thanks, > - Will > > > NOTICE: This email message is for the sole use of the intended > recipient(s) and may contain confidential and privileged information. Any > unauthorized review, use, disclosure or distribution is prohibited. If you > are not the intended recipient, please contact the sender by reply email > and destroy all copies of the original message. > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://developer.marklogic.com/pipermail/general/attachments/20120301/f9c360be/attachment-0001.html > > ------------------------------ > > Message: 5 > Date: Thu, 1 Mar 2012 13:36:36 -0800 > From: Danny Sokolsky <[email protected]> > Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high > performance, or should we use something else like > cts:uri-match()? > To: MarkLogic Developer Discussion <[email protected]> > Message-ID: > <c9924d15b04672479b089f7d55ffc1322261f34...@exchg-be.marklogic.com> > Content-Type: text/plain; charset="us-ascii" > > I think one advantage xdmp:exists has is that you can put any searchable > XPath xpression in there. So if you wanted it to return true only if a > document had a particular element, for example, then you can do something > like this: > > xdmp:exists(fn:doc("/my/uri.xml")/foo) > > So it depends if all you want to do is to see if the document exists or if > you want to do more. > > -Danny > > -----Original Message----- > From: [email protected] [mailto: > [email protected]] On Behalf Of Michael Blakeley > Sent: Thursday, March 01, 2012 1:31 PM > To: MarkLogic Developer Discussion > Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high > performance, or should we use something else like cts:uri-match()? > > It looks to me like doc-available($uri) is equivalent to > xdmp:exists(doc($uri)) now. Either expression results in a simple > list-cache lookup, with no tree fetches and no reliable difference in > elapsed-time. > > If you use a uri lexicon, probably something like exists(cts:uris($uri, > 'limit=1')) will be faster than cts:uri-match($uri). But I think there > might be cases where doc-available is cached and the lexicon lookup is not, > so the lexicon lookup may not always be faster than doc-available. > > -- Mike > > On 1 Mar 2012, at 13:25 , Danny Sokolsky wrote: > > > xdmp:exists(fn:doc("/my/uri.xml")) > > > > will be fast. > > > > The uri lexicon functions are also a good choice. > > > > -Danny > > > > > > > > From: [email protected] [mailto: > [email protected]] On Behalf OfDavid Swearingen > > Sent: Thursday, March 01, 2012 1:15 PM > > To: [email protected] > > Subject: [MarkLogic Dev General] Is fn:doc-available() high performance, > or should we use something else like cts:uri-match()? > > > > We have a system with a million or so records. When attempting to > discern if a doc with a given uri is in the system, what's the fastest > method? Thanks. > > > > > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > > ------------------------------ > > Message: 6 > Date: Thu, 1 Mar 2012 13:51:50 -0800 > From: Danny Sokolsky <[email protected]> > Subject: Re: [MarkLogic Dev General] element-query 3rd parameter? > To: MarkLogic Developer Discussion <[email protected]> > Message-ID: > <c9924d15b04672479b089f7d55ffc1322261f34...@exchg-be.marklogic.com> > Content-Type: text/plain; charset="us-ascii" > > I am not positive, but I think the 3rd param is for options, but there are > no options to cts:element-query, so it there is no documentation for it. > > -Danny > > From: [email protected] [mailto: > [email protected]] On Behalf Of William Merritt > Sawyer > Sent: Thursday, March 01, 2012 1:34 PM > To: [email protected] > Subject: [MarkLogic Dev General] cts:element-query 3rd parameter? > > I am finding cts:element-query has an optional third parameter but I am > finding no documentation mentioning it. Can anyone tell me what this third > parameter is and purpose? > Thanks, > - Will > > > NOTICE: This email message is for the sole use of the intended > recipient(s) and may contain confidential and privileged information. Any > unauthorized review, use, disclosure or distribution is prohibited. If you > are not the intended recipient, please contact the sender by reply email > and destroy all copies of the original message. > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://developer.marklogic.com/pipermail/general/attachments/20120301/f877ec2f/attachment.html > > ------------------------------ > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > > End of General Digest, Vol 93, Issue 3 > ************************************** > -- --------------------- 703-517-6910 mobile Skype: gaudimila
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
