1
0
Fork 0

move geoIndexRule to a positon before inexes have been touched by

optimizer
This commit is contained in:
Jan Christoph Uhde 2016-12-05 13:17:01 +01:00
parent 9d04b37e58
commit 9b4e01eb3b
4 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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:

View File

@ -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) {

View File

@ -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