开发者

MarkLogic Server Crashing - I Think Too Many Records Are Being Returned

开发者 https://www.devze.com 2023-03-16 14:03 出处:网络
I\'ve written an XQuery that doesn\'t return using the CQ web application. I thought the below would work, but the server still hangs.

I've written an XQuery that doesn't return using the CQ web application.

I thought the below would work, but the server still hangs.

declare namespace data = "http://marklogic.com/ps/data";
/data:doc/data:provider[ 1 to 5 ]

Any ideas? It doesn't hang if I search down the tree. I am trying to explore the data structures at this point so I need at least o开发者_开发技巧ne provider returned.

Thanks-in-advance,

Guido


I think you need parenthesis around your XPath steps. I think you have asked the server to load up all of the /data:doc/data:provider elements. Sort them in document order and then, grab the first 5. But if you have millions or billions of those elements, it will have to get them all. Which is probably taking a long time. Try this instead:

declare namespace data = "http://marklogic.com/ps/data";
(/data:doc/data:provider)[ 1 to 5 ]

-Danny

0

精彩评论

暂无评论...
验证码 换一张
取 消