Merge pull request #15607 from taosdata/feature/3.0_prof_wxy
enh: write performance optimization
This commit is contained in:
commit
f06a36b171
|
@ -1175,11 +1175,6 @@ static int parseOneRow(SInsertParseContext* pCxt, STableDataBlocks* pDataBlocks,
|
||||||
getSTSRowAppendInfo(pBuilder->rowType, spd, i, ¶m.toffset, ¶m.colIdx);
|
getSTSRowAppendInfo(pBuilder->rowType, spd, i, ¶m.toffset, ¶m.colIdx);
|
||||||
CHECK_CODE(parseValueToken(&pCxt->pSql, &sToken, pSchema, timePrec, tmpTokenBuf, MemRowAppend, ¶m, &pCxt->msg));
|
CHECK_CODE(parseValueToken(&pCxt->pSql, &sToken, pSchema, timePrec, tmpTokenBuf, MemRowAppend, ¶m, &pCxt->msg));
|
||||||
|
|
||||||
if (PRIMARYKEY_TIMESTAMP_COL_ID == pSchema->colId) {
|
|
||||||
TSKEY tsKey = TD_ROW_KEY(row);
|
|
||||||
checkTimestamp(pDataBlocks, (const char*)&tsKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i < spd->numOfBound - 1) {
|
if (i < spd->numOfBound - 1) {
|
||||||
NEXT_VALID_TOKEN(pCxt->pSql, sToken);
|
NEXT_VALID_TOKEN(pCxt->pSql, sToken);
|
||||||
if (TK_NK_COMMA != sToken.type) {
|
if (TK_NK_COMMA != sToken.type) {
|
||||||
|
@ -1188,6 +1183,9 @@ static int parseOneRow(SInsertParseContext* pCxt, STableDataBlocks* pDataBlocks,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TSKEY tsKey = TD_ROW_KEY(row);
|
||||||
|
checkTimestamp(pDataBlocks, (const char*)&tsKey);
|
||||||
|
|
||||||
if (!isParseBindParam) {
|
if (!isParseBindParam) {
|
||||||
// set the null value for the columns that do not assign values
|
// set the null value for the columns that do not assign values
|
||||||
if ((spd->numOfBound < spd->numOfCols) && TD_IS_TP_ROW(row)) {
|
if ((spd->numOfBound < spd->numOfCols) && TD_IS_TP_ROW(row)) {
|
||||||
|
|
|
@ -2427,5 +2427,8 @@ static int32_t applyOptimizeRule(SPlanContext* pCxt, SLogicSubplan* pLogicSubpla
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t optimizeLogicPlan(SPlanContext* pCxt, SLogicSubplan* pLogicSubplan) {
|
int32_t optimizeLogicPlan(SPlanContext* pCxt, SLogicSubplan* pLogicSubplan) {
|
||||||
|
if (SUBPLAN_TYPE_MODIFY == pLogicSubplan->subplanType && NULL == pLogicSubplan->pNode->pChildren) {
|
||||||
|
return TSDB_CODE_SUCCESS;
|
||||||
|
}
|
||||||
return applyOptimizeRule(pCxt, pLogicSubplan);
|
return applyOptimizeRule(pCxt, pLogicSubplan);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,9 +42,6 @@ int32_t qCreateQueryPlan(SPlanContext* pCxt, SQueryPlan** pPlan, SArray* pExecNo
|
||||||
if (TSDB_CODE_SUCCESS == code) {
|
if (TSDB_CODE_SUCCESS == code) {
|
||||||
code = createPhysiPlan(pCxt, pLogicPlan, pPlan, pExecNodeList);
|
code = createPhysiPlan(pCxt, pLogicPlan, pPlan, pExecNodeList);
|
||||||
}
|
}
|
||||||
if (TSDB_CODE_SUCCESS == code) {
|
|
||||||
dumpQueryPlan(*pPlan);
|
|
||||||
}
|
|
||||||
|
|
||||||
nodesDestroyNode((SNode*)pLogicSubplan);
|
nodesDestroyNode((SNode*)pLogicSubplan);
|
||||||
nodesDestroyNode((SNode*)pLogicPlan);
|
nodesDestroyNode((SNode*)pLogicPlan);
|
||||||
|
|
Loading…
Reference in New Issue