Jackrabbit 查询版本标签需要 40 分钟时间
Jackrabbit query for version labels taking 40 minutes time
我需要跟踪文件的历史记录,并需要根据所选节点向用户显示历史记录。我正在使用 Apache jackrabbit 获取特定版本标签的数据。我正在使用以下查询:
SELECT versioned.[jcr:uuid]
FROM [nt:frozenNode] AS versioned
INNER JOIN [nt:version] AS version
ON ISCHILDNODE(versioned,version) INNER JOIN [nt:versionLabels] as node
ON node.[20170921114713] = version.[jcr:uuid]
但是我的版本数据库有133129条记录。查询需要 35 分钟才能执行。请让我知道如何才能达到最佳性能时间。任何有类似要求并以良好性能实施的人,请告诉我。提前致谢。
Found that query is taking too much of time because of huge data in forzen node. Also getting GC over limit .
Used API to fetch the data. now time decreased to 90seconds.
TreeTraverser traverse = new TreeTraverser(node, null, TreeTraverser.InclusionPolicy.LEAVES);
int count = 0;
for (Node r : traverse) {
count++;
Node parent = r.getParent();
String test = parent.getPath();
VersionHistory history1 = session.getWorkspace().getVersionManager().getVersionHistory(test);
HashSet<String> test1 = printHistory1(history1);
map.put(test, test1);
}
我需要跟踪文件的历史记录,并需要根据所选节点向用户显示历史记录。我正在使用 Apache jackrabbit 获取特定版本标签的数据。我正在使用以下查询:
SELECT versioned.[jcr:uuid]
FROM [nt:frozenNode] AS versioned
INNER JOIN [nt:version] AS version
ON ISCHILDNODE(versioned,version) INNER JOIN [nt:versionLabels] as node
ON node.[20170921114713] = version.[jcr:uuid]
但是我的版本数据库有133129条记录。查询需要 35 分钟才能执行。请让我知道如何才能达到最佳性能时间。任何有类似要求并以良好性能实施的人,请告诉我。提前致谢。
Found that query is taking too much of time because of huge data in forzen node. Also getting GC over limit .
Used API to fetch the data. now time decreased to 90seconds.
TreeTraverser traverse = new TreeTraverser(node, null, TreeTraverser.InclusionPolicy.LEAVES);
int count = 0;
for (Node r : traverse) {
count++;
Node parent = r.getParent();
String test = parent.getPath();
VersionHistory history1 = session.getWorkspace().getVersionManager().getVersionHistory(test);
HashSet<String> test1 = printHistory1(history1);
map.put(test, test1);
}