[
https://issues.apache.org/jira/browse/OAK-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14968718#comment-14968718
]
Thomas Mueller commented on OAK-1910:
-------------------------------------
Thinking about it, sometimes loading the node is not needed, so the cost
calculation is OK. It is the responsibility to take into account the cost to
load a node if needed.
> The query engine cost calculation is incorrect
> ----------------------------------------------
>
> Key: OAK-1910
> URL: https://issues.apache.org/jira/browse/OAK-1910
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: query
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Priority: Minor
> Fix For: 1.4
>
>
> The cost calculation formula for the AdvancedQueryIndex does't take the cost
> to load a node (from the repository) into account. It currently uses:
> {noformat}
> double c = p.getCostPerExecution() + entryCount * p.getCostPerEntry();
> {noformat}
> However cost per entry is the cost of the index, not the cost of the
> repository. It should probably be
> {noformat}
> double c = p.getCostPerExecution() + entryCount * (1 + p.getCostPerEntry());
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)