From ec0074592ada593349a472116f9fc5164a43c58d Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Fri, 25 Mar 2022 15:24:09 +0800 Subject: [PATCH] improve tsbs performance --- examples/c/schemaless.c | 2 +- src/client/src/tscParseLineProtocol.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/c/schemaless.c b/examples/c/schemaless.c index e7f62ffdfe..8598c59fd4 100644 --- a/examples/c/schemaless.c +++ b/examples/c/schemaless.c @@ -149,7 +149,7 @@ int main(int argc, char* argv[]) { int assembleSTables = 0; int opt; - while ((opt = getopt(argc, argv, "s:c:r:f:t:b:p:w:hv")) != -1) { + while ((opt = getopt(argc, argv, "s:c:r:f:t:b:p:w:a:hv")) != -1) { switch (opt) { case 's': numSuperTables = atoi(optarg); diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index e45c1bc956..60e4e2334c 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -1191,7 +1191,7 @@ static int32_t applyChildTableDataPoints(TAOS* taos, char* cTableName, char* sTa SArray* cTablePoints, size_t rowSize, SSmlLinesInfo* info) { int32_t code = TSDB_CODE_SUCCESS; size_t childTableDataPoints = taosArrayGetSize(cTablePoints); - if (childTableDataPoints < 10) { + if (childTableDataPoints < 1000) { code = applyChildTableDataPointsWithInsertSQL(taos, cTableName, sTableName, sTableSchema, cTablePoints, rowSize, info); } else { code = applyChildTableDataPointsWithStmt(taos, cTableName, sTableName, sTableSchema, cTablePoints, rowSize, info); @@ -2758,8 +2758,8 @@ int taos_insert_lines(TAOS* taos, char* lines[], int numLines, SMLProtocolType p info->tsType = tsType; info->protocol = protocol; - if (numLines <= 0 || numLines > 65536) { - tscError("SML:0x%"PRIx64" taos_insert_lines numLines should be between 1 and 65536. numLines: %d", info->id, numLines); + if (numLines <= 0 || numLines > 65536*32) { + tscError("SML:0x%"PRIx64" taos_insert_lines numLines should be between 1 and 65536*32. numLines: %d", info->id, numLines); tfree(info); code = TSDB_CODE_TSC_APP_ERROR; return code; -- GitLab