You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2015/07/08 15:55:04 UTC
[jira] [Comment Edited] (OAK-3071) Add a compound index for
_modified + _id
[ https://issues.apache.org/jira/browse/OAK-3071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14618611#comment-14618611 ]
Thomas Mueller edited comment on OAK-3071 at 7/8/15 1:54 PM:
-------------------------------------------------------------
Are we sure such a compound index will help for the condition we use (benchmark numbers)? As far as I understand the docs at http://docs.mongodb.org/manual/core/multikey-index-bounds/ , a compound index will not help much here. Sure, it will use an index scan and not load the documents, but I'm not sure if this will improve performance a lot.
Maybe changing the query could help, in combination with this index (use "modified in(...)" instead of "modified >= x").
was (Author: tmueller):
Are we sure such a compound index will help for the condition we use (benchmark numbers)? As far as I understand the docs at http://docs.mongodb.org/manual/core/multikey-index-bounds/ , a compound index will not help much here.
> Add a compound index for _modified + _id
> ----------------------------------------
>
> Key: OAK-3071
> URL: https://issues.apache.org/jira/browse/OAK-3071
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mongomk
> Reporter: Chetan Mehrotra
> Fix For: 1.2.3, 1.3.4, 1.0.17
>
>
> As explained in OAK-1966 diff logic makes a call like
> bq. db.nodes.find({ _id: { $gt: "3:/content/foo/01/", $lt: "3:/content/foo010" }, _modified: { $gte: 1405085300 } }).sort({_id:1})
> For better and deterministic query performance we would need to create a compound index like \{_modified:1, _id:1\}. This index would ensure that Mongo does not have to perform object scan while evaluating such a query.
> Care must be taken that index is only created by default for fresh setup. For existing setup we should expose a JMX operation which can be invoked by system admin to create the required index as per maintenance window
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)