[CP] SQL EXEC Engine batchsize auto downgrade

Co-authored-by: qubin-ben <qubin01@gmail.com>
This commit is contained in:
hezuojiao
2023-08-14 04:12:34 +00:00
committed by ob-robot
parent 618ad9980b
commit 9cd60f84b4
36 changed files with 10909 additions and 10904 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 {