snprintf(buffer,BUFFER_SIZE,"create table if not exists %s.%s%d %s;",winfo->db_name,superTblInfo->childTblPrefix,i,superTblInfo->colsOfCreatChildTable);
len+=snprintf(buffer+len,superTblInfo->maxSqlLen-len,"if not exists %s.%s%d using %s.%s tags %s ",winfo->db_name,superTblInfo->childTblPrefix,i,winfo->db_name,superTblInfo->sTblName,tagsValBuf);
len+=snprintf(pstr+len,superTblInfo->maxSqlLen-len,"insert into %s.%s%d using %s.%s tags %s values ",winfo->db_name,superTblInfo->childTblPrefix,tbl_id,winfo->db_name,superTblInfo->sTblName,tagsValBuf);
len+=snprintf(pstr+len,
superTblInfo->maxSqlLen-len,
"insert into %s.%s%d using %s.%s tags %s values ",
winfo->db_name,
superTblInfo->childTblPrefix,
tbl_id,
winfo->db_name,
superTblInfo->sTblName,
tagsValBuf);
}else{
len+=snprintf(pstr+len,superTblInfo->maxSqlLen-len," %s.%s%d using %s.%s tags %s values ",winfo->db_name,superTblInfo->childTblPrefix,tbl_id,winfo->db_name,superTblInfo->sTblName,tagsValBuf);
len+=snprintf(pstr+len,superTblInfo->maxSqlLen-len,"insert into %s.%s%d using %s.%s tags %s values",winfo->db_name,superTblInfo->childTblPrefix,tID,winfo->db_name,superTblInfo->sTblName,tagsValBuf);
printf("====thread[%d] completed total inserted rows: %"PRId64", total affected rows: %"PRId64"====\n",winfo->threadID,totalRowsInserted,totalAffectedRows);
printf("====thread[%d] completed total inserted rows: %"PRId64", total affected rows: %"PRId64"====\n",
printf("####thread[%"PRId64"] complete all sqls to allocate all sub-tables[%d - %d] once queries duration:%.4fs\n\n",taosGetSelfPthreadId(),winfo->start_table_id,winfo->end_table_id,(double)(et-st)/1000.0);
printf("####thread[%"PRId64"] complete all sqls to allocate all sub-tables[%d - %d] once queries duration:%.4fs\n\n",