我已经习惯了Xquery来获取属性值,但是这个查询有点慢。
您能建议我哪一个indexing可以帮助加速查询吗?
**Sample Xquery**
//root/root1[@name eq "antony"] /@dept发布于 2016-04-18 15:23:33
您正在使用//。这将选择路径/root/root1[@name eq "antony"] /@dept的树中任何位置的节点。如果可能,可以尝试/root/root1[@name eq "antony"] /@dept进行索引,您可以在@name上设置属性范围索引。
发布于 2017-01-06 12:06:27
另一个建议是使用cts:search并通过MarkLogic创建indexing到Attribute Range Indexes,而不是使用非常慢的路径。此外,您还可以通过:cts:element-attribute-range-query(xs:QName("root1"), xs:QName("name"), "=", "antony")查询索引
https://stackoverflow.com/questions/36692497
复制相似问题