Marklogic:查询响应时间非常高 [英] Marklogic : Query response time is very high

查看:86
本文介绍了Marklogic:查询响应时间非常高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在uri中有大约15000条xml格式的记录,例如:"documents/products/specs/*.xml". 每个xml的大小约为25千字节.我使用具有XCC client(Java)的远程Apache Tomcat服务器连接到该marklogic服务器,该服务器尝试执行类似于以下内容的AdHocQuery:

I have around 15000 records in xml format in a uri, say:"documents/products/specs/*.xml". Each xml is of around 25 Kilo Bytes in size. I connected to this marklogic server uisng a remote Apache Tomcat Server that has a XCC client (Java), which tries to execute a AdHocQuery which resembles something like this:

let $a := cts:uri-match('documents/products/specs/*.xml')
          for $xml in $a
          return fn:doc($a)

(for循环是用Java实现的.)

(for loop is implemented in java).

这很好.但是对于数量较大的记录(例如15000条记录),当所有服务器和Internet速度都非常好时,则需要60分钟. (uri中所有文档的总大小约为20 MB,不应超过20分钟).

This works fine. But for records with larger count, say for 15000 record, it takes 60 minutes, when all the server and internet speed are very good. (Total size of all document in the uri will be around 20 MB which should not take more than 20 Minutes).

有什么解决方法吗?

推荐答案

尝试一下:

cts:search(
    fn:doc(),
    cts:document-query(
        cts:uri-match('documents/products/specs/*.xml')
    ), "unfiltered"
)

这篇关于Marklogic:查询响应时间非常高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆