[MarkLogic Dev General] Advice on improving "join" on attribute performance

David Lee David.Lee at marklogic.com
Fri Mar 16 07:21:23 PDT 2012


How big is the file being joined to  ?
If its not too big you could load they key & values into a map:map which should make the join nearly instantaneous.



-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
dlee at marklogic.com
Phone: +1 650-287-2531
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>

This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation.

From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Nick Tuckett
Sent: Friday, March 16, 2012 10:16 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Advice on improving "join" on attribute performance

Many thanks, Mike & Mike, for the swift responses!

I tried your suggestions as follows, but didn't have any joy:

 *   Factor out the $x/@localisedtextid constant - this made the query run around 35% slower.
 *   Replaced //text with the full path to those elements - negligible speed difference.
 *   Created a range index of the form [string] :text/@:id - negligible speed difference.

    *   I tried both with a reindex, and reloading the lang_en.xml document.
The index seems to be playing a part, as query tracing shows lines like this:

2012-03-16 14:12:15.199 Info: App-Services: at 4:54: Comparison contributed string range value constraint: text/@id = "ElementName144092"

instead of the hash value constraint lines.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120316/182065b0/attachment.html 


More information about the General mailing list