Add query_cost_planner gflag
Reviewers: mislav.bradac, buda, florijan Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D479
This commit is contained in:
parent
d0016ab98c
commit
7d00c4eac0
@ -4,3 +4,6 @@
|
|||||||
// false, this is useful for recerating antlr crashes in highly concurrent test.
|
// false, this is useful for recerating antlr crashes in highly concurrent test.
|
||||||
// Once antlr bugs are fixed, or real test is written this flag can be removed.
|
// Once antlr bugs are fixed, or real test is written this flag can be removed.
|
||||||
DEFINE_bool(ast_cache, true, "Use ast caching.");
|
DEFINE_bool(ast_cache, true, "Use ast caching.");
|
||||||
|
|
||||||
|
DEFINE_bool(query_cost_planner, true,
|
||||||
|
"Use the cost estimator to generate plans for queries.");
|
||||||
|
@ -14,8 +14,9 @@
|
|||||||
#include "query/plan/cost_estimator.hpp"
|
#include "query/plan/cost_estimator.hpp"
|
||||||
#include "query/plan/planner.hpp"
|
#include "query/plan/planner.hpp"
|
||||||
|
|
||||||
// TODO: Remove this flag and add flag that limits cache size.
|
// TODO: Remove ast_cache flag and add flag that limits cache size.
|
||||||
DECLARE_bool(ast_cache);
|
DECLARE_bool(ast_cache);
|
||||||
|
DECLARE_bool(query_cost_planner);
|
||||||
|
|
||||||
namespace query {
|
namespace query {
|
||||||
|
|
||||||
@ -77,8 +78,6 @@ class Interpreter : public Loggable {
|
|||||||
// high level tree -> logical plan
|
// high level tree -> logical plan
|
||||||
std::unique_ptr<plan::LogicalOperator> logical_plan;
|
std::unique_ptr<plan::LogicalOperator> logical_plan;
|
||||||
double query_plan_cost_estimation = 0.0;
|
double query_plan_cost_estimation = 0.0;
|
||||||
// TODO: Use gflags
|
|
||||||
bool FLAGS_query_cost_planner = true;
|
|
||||||
if (FLAGS_query_cost_planner) {
|
if (FLAGS_query_cost_planner) {
|
||||||
auto plans = plan::MakeLogicalPlan<plan::VariableStartPlanner>(
|
auto plans = plan::MakeLogicalPlan<plan::VariableStartPlanner>(
|
||||||
ast_storage, symbol_table, &db_accessor);
|
ast_storage, symbol_table, &db_accessor);
|
||||||
|
Loading…
Reference in New Issue
Block a user