Thanks Damon, Danny and Jason ! My question is related to the 
NonQueryOptimization.pdf (MLUC11-talks page No 17) where it is explicitly 
mentioned that the pre-generated maps speed up the performance.

My idea is to generate some map with the lookup data xml which can be set 
to server field and the while processing will retrieve the value from the 
Map present in the server field. Will map has any performance boost over 
lookup xml directly present in the expanded tree cache?

Let me correct if I am wrong.

Thanks & Regards
Abhishek Srivastav
Systems Engineer
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________



From:
Damon Feldman <[email protected]>
To:
General MarkLogic Developer Discussion <[email protected]>
Date:
05/16/2011 10:16 PM
Subject:
Re: [MarkLogic Dev General] Map API Advantage
Sent by:
[email protected]



 
To expand on what Ryan and Danny just said: the "Expanded Tree" cache 
holds fully expanded XML that has been accessed recently. So if you are 
using this document often, it will already be availalbe to the E-Node in 
that cache.
 
Yours,
Damon
From: [email protected] 
[[email protected]] On Behalf Of Danny Sokolsky 
[[email protected]]
Sent: Monday, May 16, 2011 12:32 PM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Map API Advantage

One other point here:  is this performing slowly, or are you asking a 
theoretical question?  My guess is this would perform OK without the map. 
Use the map technique if you need to squeeze a bit more out of it.  I 
would not try to optimize it unless it needs it.  If it does, try running 
the query using the cq profile button and see where it is spending time. 
 
-Danny 
 
From: [email protected] [
mailto:[email protected]] On Behalf Of Jason Hunter
Sent: Monday, May 16, 2011 8:37 AM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Map API Advantage
 
You could store it as XML, then make a map out of it, and use 
xdmp:set-server-field() to save the map in memory between requests.  Use 
xdmp:get-server-field() to retrieve it later.  On server restart you'll 
have to regenerate the map.  You'll also have to generate and save the map 
once on every E-node.  Note that the map is associated with the entire 
host, not just the app server.
 
-jh-
 
On May 16, 2011, at 3:25 AM, Abhishek53 S wrote:



Hi All 

I have my master lookup data XML inserted into Marklogic . 

<states> 
        <state> 
                <code>AL</code> 
                <desc>Alaska</desc> 
        </state> 
        : 
        : 
</states> 

I have two ways to get the description through code 

        Construct the map with the codes and values and use the map API to 
get the description. 
 
        Every time  traverse the XML to get the description through code. 

Can any one suggest  keeping performance in mind which one is better 
approach? Is there any other approach to do this (using any in-built 
indexing mechanism)? 

Abhishek Srivastav
Systems Engineer
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you

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


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


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

Reply via email to