[FEAT MERGE]: online optimizer stats gather.

Co-authored-by: obdev <obdev@oceanbase.com>
This commit is contained in:
Monk-Liu
2023-01-28 13:54:38 +08:00
committed by ob-robot
parent 735401c8d7
commit 9484175163
74 changed files with 3416 additions and 85 deletions

View File

@ -19,6 +19,7 @@
#include "ob_sql_parser.h"
#include "pl/parser/ob_pl_parser.h"
#include "lib/utility/ob_tracepoint.h"
#include "lib/json/ob_json_print_utils.h"
using namespace oceanbase::pl;
using namespace oceanbase::sql;
using namespace oceanbase::common;

View File

@ -915,6 +915,9 @@ Timestamp{whitespace}?\"[^\"]*\" {
}
}
}
<hint>APPEND { return APPEND; }
<hint>NO_GATHER_OPTIMIZER_STATISTICS { return NO_GATHER_OPTIMIZER_STATISTICS; }
<hint>GATHER_OPTIMIZER_STATISTICS { return GATHER_OPTIMIZER_STATISTICS; }
<hint>LOG_LEVEL { return LOG_LEVEL; }
<hint>LEADING { return LEADING_HINT; }
<hint>ORDERED { return ORDERED; }

View File

@ -180,6 +180,8 @@ USE_HASH_DISTINCT NO_USE_HASH_DISTINCT
DISTINCT_PUSHDOWN NO_DISTINCT_PUSHDOWN
USE_HASH_SET NO_USE_HASH_SET
USE_DISTRIBUTED_DML NO_USE_DISTRIBUTED_DML
// hint related to optimizer statistics
APPEND NO_GATHER_OPTIMIZER_STATISTICS GATHER_OPTIMIZER_STATISTICS
// other
NEG_SIGN
@ -8359,6 +8361,18 @@ READ_CONSISTENCY '(' consistency_level ')'
{
malloc_terminal_node($$, result->malloc_pool_, T_NO_COST_BASED_QUERY_TRANSFORMATION);
}
| APPEND
{
malloc_terminal_node($$, result->malloc_pool_, T_APPEND);
}
| NO_GATHER_OPTIMIZER_STATISTICS
{
malloc_terminal_node($$, result->malloc_pool_, T_NO_GATHER_OPTIMIZER_STATISTICS);
}
| GATHER_OPTIMIZER_STATISTICS
{
malloc_terminal_node($$, result->malloc_pool_, T_GATHER_OPTIMIZER_STATISTICS);
}
;
transform_hint: