I'm curious about the behavior I'm seeing.   I have a directory with about 300 
XML files total 3GB.
Each xml file is a few k to a 100M like

<logfile host="hostname" ...>
  <log ... />
   lots o logs
</logfile>


I have a fragment rule setup on <log>

This query returns fairly quickly (expected)

fn:distinct-values( xdmp:directory("/logs/","infinity")/logfile/@host )


This query gives me an expanded tree cache full error

declare variable $all_logs :=  xdmp:directory("/logs/","infinity");
fn:distinct-values( $all_logs/logfile/@host )


This is not what I'd expect.   I was under the impression that the documents 
wouldn't be pre-loaded just by declaring a variable holding a sequence of 
documents ... that it would lazy-eval as needed.
So I was expecting the 2 statements to perform similarly.

Obviously I'm wrong.   Is this as expected ?





----------------------------------------
David A. Lee
Senior Principal Software Engineer
Epocrates, Inc.
[email protected]<mailto:[email protected]>
812-482-5224

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

Reply via email to