I have encountered situations where Xpath is faster than cts:search.. It
depends how the xpath has been constructed.. and how many results would the
xpath return. If your Xpath has '//' then that would definitely slow down.



On Thu, May 12, 2011 at 11:17 AM, seme...@hotmail.com
<seme...@hotmail.com>wrote:

>  I mean in general. I've always heard that cts:search is almost always as
> fast or faster than XPath. I'm finding that to be the case, and wondering
> why that is the case in general.
>
> ------------------------------
> From: breinhol...@ldschurch.org
>
> To: general@developer.marklogic.com
> Date: Thu, 12 May 2011 09:11:17 -0600
> Subject: Re: [MarkLogic Dev General] Why is cts:search so much faster than
> XPath?
>
>
> Perhaps you could give us the XPath and the cts:search() code.  It would
> make it easier to diagnose.
>
>
>
> - Keith
>
>
>
> *From:* general-boun...@developer.marklogic.com [mailto:
> general-boun...@developer.marklogic.com] *On Behalf Of *
> seme...@hotmail.com
> *Sent:* Thursday, May 12, 2011 9:05 AM
> *To:* general@developer.marklogic.com
> *Subject:* [MarkLogic Dev General] Why is cts:search so much faster than
> XPath?
>
>
>
> I wrote awhile ago that I thought it was usually best to use search:search
> for full text searching, cts:search for node selection out of the db, and
> XPath for node selection within a document. I just ran into a situation that
> doing the same query for nodes in the DB using cts:search was 6 times faster
> than using XPath.
>
> So what is it about cts:search that makes it so fast? I assume that there
> are optimizations under the covers, but how is cts:search able to gain from
> the optimizations but XPath is not? Just curious.
>
> -Ryan
>
>
>
> 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.
>
>
> _______________________________________________ General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
>


-- 
Regards Abishek
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to