You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
feat(optimizer): add session switch to optionally enable optimizer
This commit is contained in:
@ -9197,11 +9197,12 @@ int cs_get_derived_plan(ha_columnstore_derived_handler* handler, THD* /*thd*/, S
|
||||
else if (status < 0)
|
||||
return status;
|
||||
|
||||
#ifdef DEBUG_WALK_COND
|
||||
cerr << "---------------- cs_get_derived_plan EXECUTION PLAN ----------------" << endl;
|
||||
cerr << *csep << endl;
|
||||
cerr << "-------------- EXECUTION PLAN END --------------\n" << endl;
|
||||
#endif
|
||||
if (csep->traceOn())
|
||||
{
|
||||
cerr << "---------------- cs_get_derived_plan EXECUTION PLAN ----------------" << endl;
|
||||
cerr << *csep << endl;
|
||||
cerr << "-------------- EXECUTION PLAN END --------------\n" << endl;
|
||||
}
|
||||
// Derived table projection and filter optimization.
|
||||
derivedTableOptimization(&gwi, csep);
|
||||
return 0;
|
||||
@ -9230,25 +9231,24 @@ int cs_get_select_plan(ha_columnstore_select_handler* handler, THD* /*thd*/, SCS
|
||||
else if (status < 0)
|
||||
return status;
|
||||
|
||||
// #ifdef DEBUG_WALK_COND
|
||||
cerr << "---------------- cs_get_select_plan EXECUTION PLAN ----------------" << endl;
|
||||
cerr << *csep << endl;
|
||||
cerr << "-------------- EXECUTION PLAN END --------------\n" << endl;
|
||||
// #endif
|
||||
if (csep->traceOn())
|
||||
{
|
||||
cerr << "---------------- cs_get_select_plan EXECUTION PLAN ----------------" << endl;
|
||||
cerr << *csep << endl;
|
||||
cerr << "-------------- EXECUTION PLAN END --------------\n" << endl;
|
||||
}
|
||||
|
||||
// Derived table projection and filter optimization.
|
||||
derivedTableOptimization(&gwi, csep);
|
||||
|
||||
optimizer::Rule parallelCES{"parallelCES", optimizer::matchParallelCES, optimizer::applyParallelCES};
|
||||
|
||||
bool csepWasOptimized = optimizer::optimizeCSEP(*csep);
|
||||
if (csep->traceOn() && csepWasOptimized)
|
||||
{
|
||||
parallelCES.apply(*csep);
|
||||
cerr << "---------------- cs_get_select_plan optimized EXECUTION PLAN ----------------" << endl;
|
||||
cerr << *csep << endl;
|
||||
cerr << "-------------- EXECUTION PLAN END --------------\n" << endl;
|
||||
}
|
||||
|
||||
cerr << "---------------- cs_get_select_plan rewritten EXECUTION PLAN ----------------" << endl;
|
||||
cerr << *csep << endl;
|
||||
cerr << "-------------- EXECUTION PLAN END --------------\n" << endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user