SQL EXEC Engine batchsize auto downgrade

Co-authored-by: qubin-ben <qubin01@gmail.com>
This commit is contained in:
hezuojiao
2023-07-13 03:12:18 +00:00
committed by ob-robot
parent e1e9bb369b
commit 713cfc4ea4
35 changed files with 10555 additions and 10550 deletions

View File

@ -148,6 +148,11 @@ int ObStaticEngineExprCG::detect_batch_size(const ObRawExprUniqueSet &exprs,
batch_size = static_cast<int64_t>(ObExprBatchSize::one);
}
if (is_oltp_workload(scan_cardinality)) {
// downgrade batchsize to a smaller value to minimize rowsets cost for TP
// workload
batch_size = min(OLTP_WORKLOAD_CARDINALITY, batch_size);
}
return ret;
}

View File

@ -69,7 +69,7 @@ class ObStaticEngineExprCG
{
public:
static const int64_t STACK_OVERFLOW_CHECK_DEPTH = 16;
static const int64_t OLTP_WORKLOAD_CARDINALITY = 32;
static const int64_t OLTP_WORKLOAD_CARDINALITY = 16;
static const int64_t DATUM_EVAL_INFO_SIZE = sizeof(ObDatum) + sizeof(ObEvalInfo);
friend class ObRawExpr;
struct TmpFrameInfo {