mirror of https://gitee.com/bigwinds/arangodb
move geoIndexRule to a positon before inexes have been touched by
optimizer
This commit is contained in:
parent
9d04b37e58
commit
9b4e01eb3b
|
@ -486,8 +486,8 @@ void Optimizer::setupRules() {
|
|||
patchUpdateStatementsRule_pass9, DoesNotCreateAdditionalPlans, true);
|
||||
|
||||
// patch update statements
|
||||
registerRule("geo-index-optimizer", optimizeGeoIndexRule,
|
||||
geoDistanceRule, DoesNotCreateAdditionalPlans, true);
|
||||
registerRule("geo-index-optimizer", geoIndexRule,
|
||||
applyGeoIndexRule, DoesNotCreateAdditionalPlans, true);
|
||||
|
||||
if (arangodb::ServerState::instance()->isCoordinator()) {
|
||||
// distribute operations in cluster
|
||||
|
|
|
@ -145,6 +145,8 @@ class Optimizer {
|
|||
// remove redundant OR conditions
|
||||
removeRedundantOrRule_pass6 = 820,
|
||||
|
||||
applyGeoIndexRule = 1060,
|
||||
|
||||
useIndexesRule_pass6 = 830,
|
||||
|
||||
// try to remove filters covered by index ranges
|
||||
|
@ -192,9 +194,8 @@ class Optimizer {
|
|||
removeUnnecessaryRemoteScatterRule_pass10 = 1040,
|
||||
|
||||
// recognize that a RemoveNode can be moved to the shards
|
||||
undistributeRemoveAfterEnumCollRule_pass10 = 1050,
|
||||
undistributeRemoveAfterEnumCollRule_pass10 = 1050
|
||||
|
||||
geoDistanceRule = 1060
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
|
@ -4300,7 +4300,7 @@ void checkNodesForGeoOptimization(ExecutionNode::NodeType type, ExecutionPlan* p
|
|||
}
|
||||
}
|
||||
|
||||
void arangodb::aql::optimizeGeoIndexRule(Optimizer* opt,
|
||||
void arangodb::aql::geoIndexRule(Optimizer* opt,
|
||||
ExecutionPlan* plan,
|
||||
Optimizer::Rule const* rule) {
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ void prepareTraversalsRule(Optimizer* opt, ExecutionPlan* plan,
|
|||
/// @brief moves simple subqueries one level higher
|
||||
void inlineSubqueriesRule(Optimizer*, ExecutionPlan*, Optimizer::Rule const*);
|
||||
|
||||
void optimizeGeoIndexRule(Optimizer* opt, ExecutionPlan* plan, Optimizer::Rule const* rule);
|
||||
void geoIndexRule(Optimizer* opt, ExecutionPlan* plan, Optimizer::Rule const* rule);
|
||||
} // namespace aql
|
||||
} // namespace arangodb
|
||||
|
||||
|
|
Loading…
Reference in New Issue