Hi Paul, I think that the difference will be hardly noticeable. Both cts:searches can utilize indexes, and I am certain the predicate on doc will be optimized to use indexes as well.
I do recommend using range indexes when using predicates like these.. Kind regards, Geert > Drs. G.P.H. Josten Consultant http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of Paul M > Sent: dinsdag 10 november 2009 18:22 > To: [email protected] > Subject: [MarkLogic Dev General] attributes vs elements > > <elem-a attrib1="searchme" attrib2="testme"/> > vs > > <elem-b attrib2="testme">searchme</elem-b> > > fn:doc()[./elem-a/@attrib1 = "searchme"]/elem-a/@attrib2 > fn:doc()[./elem-b = "searchme"]/elem-b/@attrib2 > > cts:search(fn:doc(), elem-att-val-qry(elem-a,attrib1, "searchme") > cts:search(fn:doc(), elem-val-qry(elem-a, "searchme") > > Searching on elements vs attributes. Which one, in general, > should be faster? > > > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
