ArangoDB:执行成本在执行计划中代表什么
ArangoDB: what does execution cost represent on execution plan
这是arango给我的执行计划的一部分
Execution plan:
Id NodeType Est. Comment
40 CalculationNode 900 - LET now = DATE_NOW() /* v8 expression */
如您所见,DATE_NOW() 花费 900。
但是,当我写一个只有 returns DATE_NOW() 的值的简单查询时,执行成本为 1,如下所示。
Execution plan:
Id NodeType Est. Comment
1 SingletonNode 1 * ROOT
2 CalculationNode 1 - LET #0 = DATE_NOW() /* v8 expression */
3 ReturnNode 1 - RETURN #0
我想知道,
1、ArangoDB如何计算执行成本?
2.执行成本代表什么?
您需要为第一个查询提供完整的计划,例如:
Query String:
LET now = DATE_NOW() RETURN now
Execution plan:
Id NodeType Est. Comment
1 SingletonNode 1 * ROOT
2 CalculationNode 1 - LET now = 1548315869319 /* json expression */ /* const assignment */
4 ReturnNode 1 - RETURN now
Indexes used:
none
Optimization rules applied:
Id RuleName
1 move-calculations-up
2 remove-redundant-calculations
3 remove-unnecessary-calculations
估计值是该节点生成或查看的文档数。
这是arango给我的执行计划的一部分
Execution plan:
Id NodeType Est. Comment
40 CalculationNode 900 - LET now = DATE_NOW() /* v8 expression */
如您所见,DATE_NOW() 花费 900。 但是,当我写一个只有 returns DATE_NOW() 的值的简单查询时,执行成本为 1,如下所示。
Execution plan:
Id NodeType Est. Comment
1 SingletonNode 1 * ROOT
2 CalculationNode 1 - LET #0 = DATE_NOW() /* v8 expression */
3 ReturnNode 1 - RETURN #0
我想知道,
1、ArangoDB如何计算执行成本?
2.执行成本代表什么?
您需要为第一个查询提供完整的计划,例如:
Query String:
LET now = DATE_NOW() RETURN now
Execution plan:
Id NodeType Est. Comment
1 SingletonNode 1 * ROOT
2 CalculationNode 1 - LET now = 1548315869319 /* json expression */ /* const assignment */
4 ReturnNode 1 - RETURN now
Indexes used:
none
Optimization rules applied:
Id RuleName
1 move-calculations-up
2 remove-redundant-calculations
3 remove-unnecessary-calculations
估计值是该节点生成或查看的文档数。