[XQZone General] limiting server output

Howard Katz howardk at fatdog.com
Tue Jul 12 11:54:06 PDT 2005


Hi Darin,

Thanks, I have considered that option (tho I'd probably write it as $result[
position() = 1 to 500 ] to be consistent with the latest state of the
specification). That doesn't answer the scenario tho, in which one or more
of the $result nodes themselves root(s) one or more large trees, and so on
downward. I've been mulling whether there's some reasonably straightforward
way of iterating through $result and its subnodes on my own, counting as I
went, but I haven't thought it through in any detail at this point.

Howard


 > -----Original Message-----
 > From: general-bounces at xqzone.marklogic.com 
 > [mailto:general-bounces at xqzone.marklogic.com] On Behalf Of 
 > McBeath, Darin W (ELS-AMS)
 > Sent: Tuesday, July 12, 2005 11:22 AM
 > To: General XQZone Discussion
 > Subject: RE: [XQZone General] limiting server output
 > 
 > Perhaps you have already considered the following ... 
 > 
 > $result[1 to 500]
 > 
 > I'm not aware of any 'built-ins' that would automatically 
 > limit the number of nodes to return.  For the most part 
 > (with the exception of xdmp:estimate) there is also no 
 > 'quick' way to count the possible number of nodes that could 
 > be returned.  But, not all queries can leverage 
 > xdmp:estimate and you also need to consider the impacts of 
 > your fragmentation strategy.
 > 
 > Darin.
 > 
 > -----Original Message-----
 > From: general-bounces at xqzone.marklogic.com
 > [mailto:general-bounces at xqzone.marklogic.com] On Behalf Of 
 > Howard Katz
 > Sent: Tuesday, July 12, 2005 1:59 PM
 > To: 'General XQZone Discussion'
 > Subject: [XQZone General] limiting server output
 > 
 >  Is there an approved way of setting a limit on server 
 > output? I don't want somebody doing a //* dump on a huge 
 > database over the web for example. I'd like to be able to 
 > limit a result sequence say to 500 or 1000 nodes or whatever.
 > 
 > It looks like I can count the nodes myself before returning 
 > a prescribed subset. If that capability is built-in tho, 
 > I've missed it.
 > 
 > Thanks,
 > Howard
 > 
 > _______________________________________________
 > General mailing list
 > General at xqzone.marklogic.com
 > http://xqzone.com/mailman/listinfo/general
 > _______________________________________________
 > General mailing list
 > General at xqzone.marklogic.com
 > http://xqzone.com/mailman/listinfo/general
 > 




More information about the General mailing list