diff --git a/docs/zh/04-get-started/01-docker.md b/docs/zh/04-get-started/01-docker.md index 364e00f8f2..1d425fed6b 100644 --- a/docs/zh/04-get-started/01-docker.md +++ b/docs/zh/04-get-started/01-docker.md @@ -1,6 +1,6 @@ --- -sidebar_label: Docker -title: 通过 Docker 快速体验 TDengine +sidebar_label: 用Docker快速体验 +title: 用 Docker 快速体验 TDengine description: 使用 Docker 快速体验 TDengine 的高效写入和查询 --- diff --git a/docs/zh/04-get-started/03-package.md b/docs/zh/04-get-started/03-package.md index 7df41af831..de479fb06e 100644 --- a/docs/zh/04-get-started/03-package.md +++ b/docs/zh/04-get-started/03-package.md @@ -1,6 +1,6 @@ --- -sidebar_label: 安装包 -title: 使用安装包立即开始 +sidebar_label: 用安装包快速体验 +title: 使用安装包快速体验 TDengine description: 使用安装包快速体验 TDengine --- diff --git a/docs/zh/04-get-started/05-cloud.md b/docs/zh/04-get-started/05-cloud.md index 1d01abb1bb..bd76add527 100644 --- a/docs/zh/04-get-started/05-cloud.md +++ b/docs/zh/04-get-started/05-cloud.md @@ -1,6 +1,6 @@ --- -sidebar_label: 云服务 -title: 通过 云服务 快速体验 TDengine +sidebar_label: 用云服务快速体验 +title: 通过云服务 快速体验 TDengine toc_max_heading_level: 4 --- diff --git a/docs/zh/04-get-started/index.md b/docs/zh/04-get-started/index.md index 4422efbf60..4d9f7ceae5 100644 --- a/docs/zh/04-get-started/index.md +++ b/docs/zh/04-get-started/index.md @@ -1,5 +1,5 @@ --- -title: 立即开始 +title: 快速体验 description: '快速设置 TDengine 环境并体验其高效写入和查询' --- diff --git a/docs/zh/05-basic/index.md b/docs/zh/05-basic/index.md index 18dcd3fc9c..f579dcb3a0 100644 --- a/docs/zh/05-basic/index.md +++ b/docs/zh/05-basic/index.md @@ -1,6 +1,6 @@ --- -title: 快速入门 -description: 'TDengine 基本功能' +title: 基础功能 +description: 'TDengine 基础功能' --- 本章主要介绍 TDengine 的数据模型以及写入和查询功能。 diff --git a/docs/zh/08-develop/01-connect/_connect_c.mdx b/docs/zh/07-develop/01-connect/_connect_c.mdx similarity index 100% rename from docs/zh/08-develop/01-connect/_connect_c.mdx rename to docs/zh/07-develop/01-connect/_connect_c.mdx diff --git a/docs/zh/08-develop/01-connect/_connect_cs.mdx b/docs/zh/07-develop/01-connect/_connect_cs.mdx similarity index 100% rename from docs/zh/08-develop/01-connect/_connect_cs.mdx rename to docs/zh/07-develop/01-connect/_connect_cs.mdx diff --git a/docs/zh/08-develop/01-connect/_connect_go.mdx b/docs/zh/07-develop/01-connect/_connect_go.mdx similarity index 100% rename from docs/zh/08-develop/01-connect/_connect_go.mdx rename to docs/zh/07-develop/01-connect/_connect_go.mdx diff --git a/docs/zh/08-develop/01-connect/_connect_java.mdx b/docs/zh/07-develop/01-connect/_connect_java.mdx similarity index 100% rename from docs/zh/08-develop/01-connect/_connect_java.mdx rename to docs/zh/07-develop/01-connect/_connect_java.mdx diff --git a/docs/zh/08-develop/01-connect/_connect_node.mdx b/docs/zh/07-develop/01-connect/_connect_node.mdx similarity index 100% rename from docs/zh/08-develop/01-connect/_connect_node.mdx rename to docs/zh/07-develop/01-connect/_connect_node.mdx diff --git a/docs/zh/08-develop/01-connect/_connect_php.mdx b/docs/zh/07-develop/01-connect/_connect_php.mdx similarity index 100% rename from docs/zh/08-develop/01-connect/_connect_php.mdx rename to docs/zh/07-develop/01-connect/_connect_php.mdx diff --git a/docs/zh/08-develop/01-connect/_connect_python.mdx b/docs/zh/07-develop/01-connect/_connect_python.mdx similarity index 100% rename from docs/zh/08-develop/01-connect/_connect_python.mdx rename to docs/zh/07-develop/01-connect/_connect_python.mdx diff --git a/docs/zh/08-develop/01-connect/_connect_r.mdx b/docs/zh/07-develop/01-connect/_connect_r.mdx similarity index 100% rename from docs/zh/08-develop/01-connect/_connect_r.mdx rename to docs/zh/07-develop/01-connect/_connect_r.mdx diff --git a/docs/zh/08-develop/01-connect/_connect_rust.mdx b/docs/zh/07-develop/01-connect/_connect_rust.mdx similarity index 100% rename from docs/zh/08-develop/01-connect/_connect_rust.mdx rename to docs/zh/07-develop/01-connect/_connect_rust.mdx diff --git a/docs/zh/08-develop/01-connect/connection-type-zh.webp b/docs/zh/07-develop/01-connect/connection-type-zh.webp similarity index 100% rename from docs/zh/08-develop/01-connect/connection-type-zh.webp rename to docs/zh/07-develop/01-connect/connection-type-zh.webp diff --git a/docs/zh/08-develop/01-connect/index.md b/docs/zh/07-develop/01-connect/index.md similarity index 100% rename from docs/zh/08-develop/01-connect/index.md rename to docs/zh/07-develop/01-connect/index.md diff --git a/docs/zh/08-develop/02-sql.md b/docs/zh/07-develop/02-sql.md similarity index 100% rename from docs/zh/08-develop/02-sql.md rename to docs/zh/07-develop/02-sql.md diff --git a/docs/zh/08-develop/04-schemaless.md b/docs/zh/07-develop/04-schemaless.md similarity index 100% rename from docs/zh/08-develop/04-schemaless.md rename to docs/zh/07-develop/04-schemaless.md diff --git a/docs/zh/08-develop/05-stmt.md b/docs/zh/07-develop/05-stmt.md similarity index 100% rename from docs/zh/08-develop/05-stmt.md rename to docs/zh/07-develop/05-stmt.md diff --git a/docs/zh/08-develop/07-tmq.md b/docs/zh/07-develop/07-tmq.md similarity index 100% rename from docs/zh/08-develop/07-tmq.md rename to docs/zh/07-develop/07-tmq.md diff --git a/docs/zh/08-develop/09-udf.md b/docs/zh/07-develop/09-udf.md similarity index 100% rename from docs/zh/08-develop/09-udf.md rename to docs/zh/07-develop/09-udf.md diff --git a/docs/zh/08-develop/15-high.md b/docs/zh/07-develop/15-high.md similarity index 100% rename from docs/zh/08-develop/15-high.md rename to docs/zh/07-develop/15-high.md diff --git a/docs/zh/08-develop/_sub_c.mdx b/docs/zh/07-develop/_sub_c.mdx similarity index 100% rename from docs/zh/08-develop/_sub_c.mdx rename to docs/zh/07-develop/_sub_c.mdx diff --git a/docs/zh/08-develop/_sub_cs.mdx b/docs/zh/07-develop/_sub_cs.mdx similarity index 100% rename from docs/zh/08-develop/_sub_cs.mdx rename to docs/zh/07-develop/_sub_cs.mdx diff --git a/docs/zh/08-develop/_sub_go.mdx b/docs/zh/07-develop/_sub_go.mdx similarity index 100% rename from docs/zh/08-develop/_sub_go.mdx rename to docs/zh/07-develop/_sub_go.mdx diff --git a/docs/zh/08-develop/_sub_java.mdx b/docs/zh/07-develop/_sub_java.mdx similarity index 100% rename from docs/zh/08-develop/_sub_java.mdx rename to docs/zh/07-develop/_sub_java.mdx diff --git a/docs/zh/08-develop/_sub_java_ws.mdx b/docs/zh/07-develop/_sub_java_ws.mdx similarity index 100% rename from docs/zh/08-develop/_sub_java_ws.mdx rename to docs/zh/07-develop/_sub_java_ws.mdx diff --git a/docs/zh/08-develop/_sub_node.mdx b/docs/zh/07-develop/_sub_node.mdx similarity index 100% rename from docs/zh/08-develop/_sub_node.mdx rename to docs/zh/07-develop/_sub_node.mdx diff --git a/docs/zh/08-develop/_sub_python.mdx b/docs/zh/07-develop/_sub_python.mdx similarity index 100% rename from docs/zh/08-develop/_sub_python.mdx rename to docs/zh/07-develop/_sub_python.mdx diff --git a/docs/zh/08-develop/_sub_rust.mdx b/docs/zh/07-develop/_sub_rust.mdx similarity index 100% rename from docs/zh/08-develop/_sub_rust.mdx rename to docs/zh/07-develop/_sub_rust.mdx diff --git a/docs/zh/08-develop/addsource.png b/docs/zh/07-develop/addsource.png similarity index 100% rename from docs/zh/08-develop/addsource.png rename to docs/zh/07-develop/addsource.png diff --git a/docs/zh/08-develop/dashboard.png b/docs/zh/07-develop/dashboard.png similarity index 100% rename from docs/zh/08-develop/dashboard.png rename to docs/zh/07-develop/dashboard.png diff --git a/docs/zh/08-develop/dashboard2.png b/docs/zh/07-develop/dashboard2.png similarity index 100% rename from docs/zh/08-develop/dashboard2.png rename to docs/zh/07-develop/dashboard2.png diff --git a/docs/zh/08-develop/highvolume.webp b/docs/zh/07-develop/highvolume.webp similarity index 100% rename from docs/zh/08-develop/highvolume.webp rename to docs/zh/07-develop/highvolume.webp diff --git a/docs/zh/08-develop/img_5.png b/docs/zh/07-develop/img_5.png similarity index 100% rename from docs/zh/08-develop/img_5.png rename to docs/zh/07-develop/img_5.png diff --git a/docs/zh/08-develop/img_6.png b/docs/zh/07-develop/img_6.png similarity index 100% rename from docs/zh/08-develop/img_6.png rename to docs/zh/07-develop/img_6.png diff --git a/docs/zh/08-develop/img_7.png b/docs/zh/07-develop/img_7.png similarity index 100% rename from docs/zh/08-develop/img_7.png rename to docs/zh/07-develop/img_7.png diff --git a/docs/zh/08-develop/index.md b/docs/zh/07-develop/index.md similarity index 100% rename from docs/zh/08-develop/index.md rename to docs/zh/07-develop/index.md diff --git a/docs/zh/07-operation/tdengine-topology.png b/docs/zh/07-operation/tdengine-topology.png deleted file mode 100644 index c2a2dee550..0000000000 Binary files a/docs/zh/07-operation/tdengine-topology.png and /dev/null differ diff --git a/docs/zh/07-operation/01-intro.md b/docs/zh/08-operation/01-intro.md similarity index 100% rename from docs/zh/07-operation/01-intro.md rename to docs/zh/08-operation/01-intro.md diff --git a/docs/zh/07-operation/02-planning.md b/docs/zh/08-operation/02-planning.md similarity index 100% rename from docs/zh/07-operation/02-planning.md rename to docs/zh/08-operation/02-planning.md diff --git a/docs/zh/07-operation/03-deployment.md b/docs/zh/08-operation/03-deployment.md similarity index 100% rename from docs/zh/07-operation/03-deployment.md rename to docs/zh/08-operation/03-deployment.md diff --git a/docs/zh/07-operation/04-maintenance.md b/docs/zh/08-operation/04-maintenance.md similarity index 100% rename from docs/zh/07-operation/04-maintenance.md rename to docs/zh/08-operation/04-maintenance.md diff --git a/docs/zh/07-operation/05-monitor.md b/docs/zh/08-operation/05-monitor.md similarity index 100% rename from docs/zh/07-operation/05-monitor.md rename to docs/zh/08-operation/05-monitor.md diff --git a/docs/zh/07-operation/06-gui.md b/docs/zh/08-operation/06-gui.md similarity index 100% rename from docs/zh/07-operation/06-gui.md rename to docs/zh/08-operation/06-gui.md diff --git a/docs/zh/07-operation/09-backup.md b/docs/zh/08-operation/09-backup.md similarity index 100% rename from docs/zh/07-operation/09-backup.md rename to docs/zh/08-operation/09-backup.md diff --git a/docs/zh/07-operation/10-disaster.md b/docs/zh/08-operation/10-disaster.md similarity index 100% rename from docs/zh/07-operation/10-disaster.md rename to docs/zh/08-operation/10-disaster.md diff --git a/docs/zh/07-operation/12-multi.md b/docs/zh/08-operation/12-multi.md similarity index 100% rename from docs/zh/07-operation/12-multi.md rename to docs/zh/08-operation/12-multi.md diff --git a/docs/zh/07-operation/14-user.md b/docs/zh/08-operation/14-user.md similarity index 100% rename from docs/zh/07-operation/14-user.md rename to docs/zh/08-operation/14-user.md diff --git a/docs/zh/07-operation/16-security.md b/docs/zh/08-operation/16-security.md similarity index 100% rename from docs/zh/07-operation/16-security.md rename to docs/zh/08-operation/16-security.md diff --git a/docs/zh/07-operation/18-dual.md b/docs/zh/08-operation/18-dual.md similarity index 100% rename from docs/zh/07-operation/18-dual.md rename to docs/zh/08-operation/18-dual.md diff --git a/docs/zh/07-operation/Active-Standby.png b/docs/zh/08-operation/Active-Standby.png similarity index 100% rename from docs/zh/07-operation/Active-Standby.png rename to docs/zh/08-operation/Active-Standby.png diff --git a/docs/zh/07-operation/TDinsight-1-cluster-status.webp b/docs/zh/08-operation/TDinsight-1-cluster-status.webp similarity index 100% rename from docs/zh/07-operation/TDinsight-1-cluster-status.webp rename to docs/zh/08-operation/TDinsight-1-cluster-status.webp diff --git a/docs/zh/07-operation/grafana.png b/docs/zh/08-operation/grafana.png similarity index 100% rename from docs/zh/07-operation/grafana.png rename to docs/zh/08-operation/grafana.png diff --git a/docs/zh/07-operation/index.md b/docs/zh/08-operation/index.md similarity index 100% rename from docs/zh/07-operation/index.md rename to docs/zh/08-operation/index.md diff --git a/docs/zh/07-operation/pic/Active-Standby.png b/docs/zh/08-operation/pic/Active-Standby.png similarity index 100% rename from docs/zh/07-operation/pic/Active-Standby.png rename to docs/zh/08-operation/pic/Active-Standby.png diff --git a/docs/zh/07-operation/pic/agent-01.png b/docs/zh/08-operation/pic/agent-01.png similarity index 100% rename from docs/zh/07-operation/pic/agent-01.png rename to docs/zh/08-operation/pic/agent-01.png diff --git a/docs/zh/07-operation/pic/agent-02.png b/docs/zh/08-operation/pic/agent-02.png similarity index 100% rename from docs/zh/07-operation/pic/agent-02.png rename to docs/zh/08-operation/pic/agent-02.png diff --git a/docs/zh/07-operation/pic/agent-03.png b/docs/zh/08-operation/pic/agent-03.png similarity index 100% rename from docs/zh/07-operation/pic/agent-03.png rename to docs/zh/08-operation/pic/agent-03.png diff --git a/docs/zh/07-operation/pic/agent-04.png b/docs/zh/08-operation/pic/agent-04.png similarity index 100% rename from docs/zh/07-operation/pic/agent-04.png rename to docs/zh/08-operation/pic/agent-04.png diff --git a/docs/zh/07-operation/pic/datain-01.png b/docs/zh/08-operation/pic/datain-01.png similarity index 100% rename from docs/zh/07-operation/pic/datain-01.png rename to docs/zh/08-operation/pic/datain-01.png diff --git a/docs/zh/07-operation/pic/datain-02.png b/docs/zh/08-operation/pic/datain-02.png similarity index 100% rename from docs/zh/07-operation/pic/datain-02.png rename to docs/zh/08-operation/pic/datain-02.png diff --git a/docs/zh/07-operation/pic/datain-03.png b/docs/zh/08-operation/pic/datain-03.png similarity index 100% rename from docs/zh/07-operation/pic/datain-03.png rename to docs/zh/08-operation/pic/datain-03.png diff --git a/docs/zh/07-operation/pic/explorer-01-explorer-entry.jpeg b/docs/zh/08-operation/pic/explorer-01-explorer-entry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-01-explorer-entry.jpeg rename to docs/zh/08-operation/pic/explorer-01-explorer-entry.jpeg diff --git a/docs/zh/07-operation/pic/explorer-02-createDbentry.jpeg b/docs/zh/08-operation/pic/explorer-02-createDbentry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-02-createDbentry.jpeg rename to docs/zh/08-operation/pic/explorer-02-createDbentry.jpeg diff --git a/docs/zh/07-operation/pic/explorer-03-createDbPage.jpeg b/docs/zh/08-operation/pic/explorer-03-createDbPage.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-03-createDbPage.jpeg rename to docs/zh/08-operation/pic/explorer-03-createDbPage.jpeg diff --git a/docs/zh/07-operation/pic/explorer-04-createDbPage2.jpeg b/docs/zh/08-operation/pic/explorer-04-createDbPage2.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-04-createDbPage2.jpeg rename to docs/zh/08-operation/pic/explorer-04-createDbPage2.jpeg diff --git a/docs/zh/07-operation/pic/explorer-05-createDbtest01.jpeg b/docs/zh/08-operation/pic/explorer-05-createDbtest01.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-05-createDbtest01.jpeg rename to docs/zh/08-operation/pic/explorer-05-createDbtest01.jpeg diff --git a/docs/zh/07-operation/pic/explorer-06-sqlCreateDb.jpeg b/docs/zh/08-operation/pic/explorer-06-sqlCreateDb.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-06-sqlCreateDb.jpeg rename to docs/zh/08-operation/pic/explorer-06-sqlCreateDb.jpeg diff --git a/docs/zh/07-operation/pic/explorer-07-createDbtest02.jpeg b/docs/zh/08-operation/pic/explorer-07-createDbtest02.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-07-createDbtest02.jpeg rename to docs/zh/08-operation/pic/explorer-07-createDbtest02.jpeg diff --git a/docs/zh/07-operation/pic/explorer-08-createStbEntry.jpeg b/docs/zh/08-operation/pic/explorer-08-createStbEntry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-08-createStbEntry.jpeg rename to docs/zh/08-operation/pic/explorer-08-createStbEntry.jpeg diff --git a/docs/zh/07-operation/pic/explorer-09-createStbPage.jpeg b/docs/zh/08-operation/pic/explorer-09-createStbPage.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-09-createStbPage.jpeg rename to docs/zh/08-operation/pic/explorer-09-createStbPage.jpeg diff --git a/docs/zh/07-operation/pic/explorer-10-createStbSucc.jpeg b/docs/zh/08-operation/pic/explorer-10-createStbSucc.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-10-createStbSucc.jpeg rename to docs/zh/08-operation/pic/explorer-10-createStbSucc.jpeg diff --git a/docs/zh/07-operation/pic/explorer-11-viewStableEntry.jpeg b/docs/zh/08-operation/pic/explorer-11-viewStableEntry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-11-viewStableEntry.jpeg rename to docs/zh/08-operation/pic/explorer-11-viewStableEntry.jpeg diff --git a/docs/zh/07-operation/pic/explorer-12-viewStableInfo.jpeg b/docs/zh/08-operation/pic/explorer-12-viewStableInfo.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-12-viewStableInfo.jpeg rename to docs/zh/08-operation/pic/explorer-12-viewStableInfo.jpeg diff --git a/docs/zh/07-operation/pic/explorer-13-editStableEntry.jpeg b/docs/zh/08-operation/pic/explorer-13-editStableEntry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-13-editStableEntry.jpeg rename to docs/zh/08-operation/pic/explorer-13-editStableEntry.jpeg diff --git a/docs/zh/07-operation/pic/explorer-14-editStableInfo.jpeg b/docs/zh/08-operation/pic/explorer-14-editStableInfo.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-14-editStableInfo.jpeg rename to docs/zh/08-operation/pic/explorer-14-editStableInfo.jpeg diff --git a/docs/zh/07-operation/pic/explorer-15-delStb.jpeg b/docs/zh/08-operation/pic/explorer-15-delStb.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-15-delStb.jpeg rename to docs/zh/08-operation/pic/explorer-15-delStb.jpeg diff --git a/docs/zh/07-operation/pic/explorer-16-sqlEditor.jpeg b/docs/zh/08-operation/pic/explorer-16-sqlEditor.jpeg similarity index 100% rename from docs/zh/07-operation/pic/explorer-16-sqlEditor.jpeg rename to docs/zh/08-operation/pic/explorer-16-sqlEditor.jpeg diff --git a/docs/zh/07-operation/pic/explorer-17-favoritesAdd.png b/docs/zh/08-operation/pic/explorer-17-favoritesAdd.png similarity index 100% rename from docs/zh/07-operation/pic/explorer-17-favoritesAdd.png rename to docs/zh/08-operation/pic/explorer-17-favoritesAdd.png diff --git a/docs/zh/07-operation/pic/explorer-18-favoritesAddPublic.png b/docs/zh/08-operation/pic/explorer-18-favoritesAddPublic.png similarity index 100% rename from docs/zh/07-operation/pic/explorer-18-favoritesAddPublic.png rename to docs/zh/08-operation/pic/explorer-18-favoritesAddPublic.png diff --git a/docs/zh/07-operation/pic/explorer-19-favoritesPublic.png b/docs/zh/08-operation/pic/explorer-19-favoritesPublic.png similarity index 100% rename from docs/zh/07-operation/pic/explorer-19-favoritesPublic.png rename to docs/zh/08-operation/pic/explorer-19-favoritesPublic.png diff --git a/docs/zh/07-operation/pic/explorer-20-favoritesCancelPublic.png b/docs/zh/08-operation/pic/explorer-20-favoritesCancelPublic.png similarity index 100% rename from docs/zh/07-operation/pic/explorer-20-favoritesCancelPublic.png rename to docs/zh/08-operation/pic/explorer-20-favoritesCancelPublic.png diff --git a/docs/zh/07-operation/pic/explorer-21-favoritesSearch.png b/docs/zh/08-operation/pic/explorer-21-favoritesSearch.png similarity index 100% rename from docs/zh/07-operation/pic/explorer-21-favoritesSearch.png rename to docs/zh/08-operation/pic/explorer-21-favoritesSearch.png diff --git a/docs/zh/07-operation/pic/explorer-22-favoritesDelete.png b/docs/zh/08-operation/pic/explorer-22-favoritesDelete.png similarity index 100% rename from docs/zh/07-operation/pic/explorer-22-favoritesDelete.png rename to docs/zh/08-operation/pic/explorer-22-favoritesDelete.png diff --git a/docs/zh/07-operation/pic/explorer-23-favoritesNotes.png b/docs/zh/08-operation/pic/explorer-23-favoritesNotes.png similarity index 100% rename from docs/zh/07-operation/pic/explorer-23-favoritesNotes.png rename to docs/zh/08-operation/pic/explorer-23-favoritesNotes.png diff --git a/docs/zh/07-operation/pic/management-01-importInfo.jpeg b/docs/zh/08-operation/pic/management-01-importInfo.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-01-importInfo.jpeg rename to docs/zh/08-operation/pic/management-01-importInfo.jpeg diff --git a/docs/zh/07-operation/pic/management-01-slowsql.jpeg b/docs/zh/08-operation/pic/management-01-slowsql.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-01-slowsql.jpeg rename to docs/zh/08-operation/pic/management-01-slowsql.jpeg diff --git a/docs/zh/07-operation/pic/management-01-systemEntry.jpeg b/docs/zh/08-operation/pic/management-01-systemEntry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-01-systemEntry.jpeg rename to docs/zh/08-operation/pic/management-01-systemEntry.jpeg diff --git a/docs/zh/07-operation/pic/management-02-addUser.jpeg b/docs/zh/08-operation/pic/management-02-addUser.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-02-addUser.jpeg rename to docs/zh/08-operation/pic/management-02-addUser.jpeg diff --git a/docs/zh/07-operation/pic/management-02-addUserSucc.jpeg b/docs/zh/08-operation/pic/management-02-addUserSucc.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-02-addUserSucc.jpeg rename to docs/zh/08-operation/pic/management-02-addUserSucc.jpeg diff --git a/docs/zh/07-operation/pic/management-02-slowsql.jpeg b/docs/zh/08-operation/pic/management-02-slowsql.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-02-slowsql.jpeg rename to docs/zh/08-operation/pic/management-02-slowsql.jpeg diff --git a/docs/zh/07-operation/pic/management-04-backupEntry.jpeg b/docs/zh/08-operation/pic/management-04-backupEntry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-04-backupEntry.jpeg rename to docs/zh/08-operation/pic/management-04-backupEntry.jpeg diff --git a/docs/zh/07-operation/pic/management-04-backupModal.jpeg b/docs/zh/08-operation/pic/management-04-backupModal.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-04-backupModal.jpeg rename to docs/zh/08-operation/pic/management-04-backupModal.jpeg diff --git a/docs/zh/07-operation/pic/management-06-cluster.jpeg b/docs/zh/08-operation/pic/management-06-cluster.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-06-cluster.jpeg rename to docs/zh/08-operation/pic/management-06-cluster.jpeg diff --git a/docs/zh/07-operation/pic/management-07-license.jpeg b/docs/zh/08-operation/pic/management-07-license.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-07-license.jpeg rename to docs/zh/08-operation/pic/management-07-license.jpeg diff --git a/docs/zh/07-operation/pic/management-08-activationCode.jpeg b/docs/zh/08-operation/pic/management-08-activationCode.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-08-activationCode.jpeg rename to docs/zh/08-operation/pic/management-08-activationCode.jpeg diff --git a/docs/zh/07-operation/pic/management-09-audit.jpeg b/docs/zh/08-operation/pic/management-09-audit.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-09-audit.jpeg rename to docs/zh/08-operation/pic/management-09-audit.jpeg diff --git a/docs/zh/07-operation/pic/management-10-replicationEntry.jpeg b/docs/zh/08-operation/pic/management-10-replicationEntry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-10-replicationEntry.jpeg rename to docs/zh/08-operation/pic/management-10-replicationEntry.jpeg diff --git a/docs/zh/07-operation/pic/management-11-replicationModal.jpeg b/docs/zh/08-operation/pic/management-11-replicationModal.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-11-replicationModal.jpeg rename to docs/zh/08-operation/pic/management-11-replicationModal.jpeg diff --git a/docs/zh/07-operation/pic/management-12-licenseNew.jpeg b/docs/zh/08-operation/pic/management-12-licenseNew.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-12-licenseNew.jpeg rename to docs/zh/08-operation/pic/management-12-licenseNew.jpeg diff --git a/docs/zh/07-operation/pic/management-13-activationCodeNew.jpeg b/docs/zh/08-operation/pic/management-13-activationCodeNew.jpeg similarity index 100% rename from docs/zh/07-operation/pic/management-13-activationCodeNew.jpeg rename to docs/zh/08-operation/pic/management-13-activationCodeNew.jpeg diff --git a/docs/zh/07-operation/pic/monitor-01.jpg b/docs/zh/08-operation/pic/monitor-01.jpg similarity index 100% rename from docs/zh/07-operation/pic/monitor-01.jpg rename to docs/zh/08-operation/pic/monitor-01.jpg diff --git a/docs/zh/07-operation/pic/monitor-02.jpg b/docs/zh/08-operation/pic/monitor-02.jpg similarity index 100% rename from docs/zh/07-operation/pic/monitor-02.jpg rename to docs/zh/08-operation/pic/monitor-02.jpg diff --git a/docs/zh/07-operation/pic/monitor-03.png b/docs/zh/08-operation/pic/monitor-03.png similarity index 100% rename from docs/zh/07-operation/pic/monitor-03.png rename to docs/zh/08-operation/pic/monitor-03.png diff --git a/docs/zh/07-operation/pic/monitor-04.jpg b/docs/zh/08-operation/pic/monitor-04.jpg similarity index 100% rename from docs/zh/07-operation/pic/monitor-04.jpg rename to docs/zh/08-operation/pic/monitor-04.jpg diff --git a/docs/zh/07-operation/pic/monitor-05.png b/docs/zh/08-operation/pic/monitor-05.png similarity index 100% rename from docs/zh/07-operation/pic/monitor-05.png rename to docs/zh/08-operation/pic/monitor-05.png diff --git a/docs/zh/07-operation/pic/monitor-06.jpg b/docs/zh/08-operation/pic/monitor-06.jpg similarity index 100% rename from docs/zh/07-operation/pic/monitor-06.jpg rename to docs/zh/08-operation/pic/monitor-06.jpg diff --git a/docs/zh/07-operation/pic/monitor-07.png b/docs/zh/08-operation/pic/monitor-07.png similarity index 100% rename from docs/zh/07-operation/pic/monitor-07.png rename to docs/zh/08-operation/pic/monitor-07.png diff --git a/docs/zh/07-operation/pic/monitor-08.png b/docs/zh/08-operation/pic/monitor-08.png similarity index 100% rename from docs/zh/07-operation/pic/monitor-08.png rename to docs/zh/08-operation/pic/monitor-08.png diff --git a/docs/zh/07-operation/pic/monitor-09.jpg b/docs/zh/08-operation/pic/monitor-09.jpg similarity index 100% rename from docs/zh/07-operation/pic/monitor-09.jpg rename to docs/zh/08-operation/pic/monitor-09.jpg diff --git a/docs/zh/07-operation/pic/monitor-10.jpg b/docs/zh/08-operation/pic/monitor-10.jpg similarity index 100% rename from docs/zh/07-operation/pic/monitor-10.jpg rename to docs/zh/08-operation/pic/monitor-10.jpg diff --git a/docs/zh/07-operation/pic/stream-01-streamEntry.jpeg b/docs/zh/08-operation/pic/stream-01-streamEntry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/stream-01-streamEntry.jpeg rename to docs/zh/08-operation/pic/stream-01-streamEntry.jpeg diff --git a/docs/zh/07-operation/pic/stream-02-createStreamEntry.jpeg b/docs/zh/08-operation/pic/stream-02-createStreamEntry.jpeg similarity index 100% rename from docs/zh/07-operation/pic/stream-02-createStreamEntry.jpeg rename to docs/zh/08-operation/pic/stream-02-createStreamEntry.jpeg diff --git a/docs/zh/07-operation/pic/stream-03-createStreamWizard.jpeg b/docs/zh/08-operation/pic/stream-03-createStreamWizard.jpeg similarity index 100% rename from docs/zh/07-operation/pic/stream-03-createStreamWizard.jpeg rename to docs/zh/08-operation/pic/stream-03-createStreamWizard.jpeg diff --git a/docs/zh/07-operation/pic/stream-04-createStreamWizard.jpeg b/docs/zh/08-operation/pic/stream-04-createStreamWizard.jpeg similarity index 100% rename from docs/zh/07-operation/pic/stream-04-createStreamWizard.jpeg rename to docs/zh/08-operation/pic/stream-04-createStreamWizard.jpeg diff --git a/docs/zh/07-operation/pic/stream-05-createStreamSucc1.jpeg b/docs/zh/08-operation/pic/stream-05-createStreamSucc1.jpeg similarity index 100% rename from docs/zh/07-operation/pic/stream-05-createStreamSucc1.jpeg rename to docs/zh/08-operation/pic/stream-05-createStreamSucc1.jpeg diff --git a/docs/zh/07-operation/pic/stream-06-createStreamSql.jpeg b/docs/zh/08-operation/pic/stream-06-createStreamSql.jpeg similarity index 100% rename from docs/zh/07-operation/pic/stream-06-createStreamSql.jpeg rename to docs/zh/08-operation/pic/stream-06-createStreamSql.jpeg diff --git a/docs/zh/07-operation/pic/stream-07-createStreamSucc2.jpeg b/docs/zh/08-operation/pic/stream-07-createStreamSucc2.jpeg similarity index 100% rename from docs/zh/07-operation/pic/stream-07-createStreamSucc2.jpeg rename to docs/zh/08-operation/pic/stream-07-createStreamSucc2.jpeg diff --git a/docs/zh/07-operation/pic/topic-01-dataSubscription.jpeg b/docs/zh/08-operation/pic/topic-01-dataSubscription.jpeg similarity index 100% rename from docs/zh/07-operation/pic/topic-01-dataSubscription.jpeg rename to docs/zh/08-operation/pic/topic-01-dataSubscription.jpeg diff --git a/docs/zh/07-operation/pic/topic-02-addTopic.jpeg b/docs/zh/08-operation/pic/topic-02-addTopic.jpeg similarity index 100% rename from docs/zh/07-operation/pic/topic-02-addTopic.jpeg rename to docs/zh/08-operation/pic/topic-02-addTopic.jpeg diff --git a/docs/zh/07-operation/pic/topic-03-addTopicWizard.jpeg b/docs/zh/08-operation/pic/topic-03-addTopicWizard.jpeg similarity index 100% rename from docs/zh/07-operation/pic/topic-03-addTopicWizard.jpeg rename to docs/zh/08-operation/pic/topic-03-addTopicWizard.jpeg diff --git a/docs/zh/07-operation/pic/topic-05-addTopicSucc1.jpeg b/docs/zh/08-operation/pic/topic-05-addTopicSucc1.jpeg similarity index 100% rename from docs/zh/07-operation/pic/topic-05-addTopicSucc1.jpeg rename to docs/zh/08-operation/pic/topic-05-addTopicSucc1.jpeg diff --git a/docs/zh/07-operation/pic/topic-06-addTopicSql.jpeg b/docs/zh/08-operation/pic/topic-06-addTopicSql.jpeg similarity index 100% rename from docs/zh/07-operation/pic/topic-06-addTopicSql.jpeg rename to docs/zh/08-operation/pic/topic-06-addTopicSql.jpeg diff --git a/docs/zh/07-operation/pic/topic-07-addTopicsSucc2.jpeg b/docs/zh/08-operation/pic/topic-07-addTopicsSucc2.jpeg similarity index 100% rename from docs/zh/07-operation/pic/topic-07-addTopicsSucc2.jpeg rename to docs/zh/08-operation/pic/topic-07-addTopicsSucc2.jpeg diff --git a/docs/zh/07-operation/pic/topic-08-shareTopic.jpeg b/docs/zh/08-operation/pic/topic-08-shareTopic.jpeg similarity index 100% rename from docs/zh/07-operation/pic/topic-08-shareTopic.jpeg rename to docs/zh/08-operation/pic/topic-08-shareTopic.jpeg diff --git a/docs/zh/07-operation/pic/topic-09-sample.jpeg b/docs/zh/08-operation/pic/topic-09-sample.jpeg similarity index 100% rename from docs/zh/07-operation/pic/topic-09-sample.jpeg rename to docs/zh/08-operation/pic/topic-09-sample.jpeg diff --git a/docs/zh/07-operation/pic/topic-10-consumer.jpeg b/docs/zh/08-operation/pic/topic-10-consumer.jpeg similarity index 100% rename from docs/zh/07-operation/pic/topic-10-consumer.jpeg rename to docs/zh/08-operation/pic/topic-10-consumer.jpeg diff --git a/docs/zh/08-operation/tdengine-topology.png b/docs/zh/08-operation/tdengine-topology.png new file mode 100644 index 0000000000..7c3f8e078e Binary files /dev/null and b/docs/zh/08-operation/tdengine-topology.png differ diff --git a/docs/zh/14-reference/02-tools/08-taos-cli.md b/docs/zh/14-reference/02-tools/08-taos-cli.md new file mode 100644 index 0000000000..3eea24ac7b --- /dev/null +++ b/docs/zh/14-reference/02-tools/08-taos-cli.md @@ -0,0 +1,102 @@ +--- +title: TDengine CLI 参考手册 +sidebar_label: taos +toc_max_heading_level: 4 +--- + +TDengine 命令行程序(以下简称 TDengine CLI)是用户操作 TDengine 实例并与之交互的最简洁最常用的方式。 使用前需要安装 TDengine Server 安装包或 TDengine Client 安装包。 + +## 启动 + +要进入 TDengine CLI,您只要在终端执行 `taos` 即可。 + +```bash +taos +``` + +如果连接服务成功,将会打印出欢迎消息和版本信息。如果失败,则会打印错误消息。 + +TDengine CLI 的提示符号如下: + +```shell +taos> +``` + +进入 TDengine CLI 后,你可执行各种 SQL 语句,包括插入、查询以及各种管理命令。 + +## 执行 SQL 脚本 + +在 TDengine CLI 里可以通过 `source` 命令来运行脚本文件中的多条 SQL 命令。 + +```sql +taos> source ; +``` + +## 在线修改显示字符宽度 + +可以在 TDengine CLI 里使用如下命令调整字符显示宽度 + +```sql +taos> SET MAX_BINARY_DISPLAY_WIDTH ; +``` + +如显示的内容后面以 ... 结尾时,表示该内容已被截断,可通过本命令修改显示字符宽度以显示完整的内容。 + +## 命令行参数 + +您可通过配置命令行参数来改变 TDengine CLI 的行为。以下为常用的几个命令行参数: + +- -h HOST: 要连接的 TDengine 服务端所在服务器的 FQDN, 默认为连接本地服务 +- -P PORT: 指定服务端所用端口号 +- -u USER: 连接时使用的用户名 +- -p PASSWORD: 连接服务端时使用的密码 +- -?, --help: 打印出所有命令行参数 + +还有更多其他参数: + +- -a AUTHSTR: 连接服务端的授权信息 +- -A: 通过用户名和密码计算授权信息 +- -B: 设置 BI 工具显示模式,设置后所有输出都遵循 BI 工具的格式进行输出 +- -c CONFIGDIR: 指定配置文件目录,Linux 环境下默认为 `/etc/taos`,该目录下的配置文件默认名称为 `taos.cfg` +- -C: 打印 -c 指定的目录中 `taos.cfg` 的配置参数 +- -d DATABASE: 指定连接到服务端时使用的数据库 +- -E dsn: 使用 WebSocket DSN 连接云服务或者提供 WebSocket 连接的服务端 +- -f FILE: 以非交互模式执行 SQL 脚本文件。文件中一个 SQL 语句只能占一行 +- -k: 测试服务端运行状态,0: unavailable,1: network ok,2: service ok,3: service degraded,4: exiting +- -l PKTLEN: 网络测试时使用的测试包大小 +- -n NETROLE: 网络连接测试时的测试范围,默认为 `client`, 可选值为 `client`、`server` +- -N PKTNUM: 网络测试时使用的测试包数量 +- -r: 将时间输出出无符号 64 位整数类型(即 C 语音中 uint64_t) +- -R: 使用 RESTful 模式连接服务端 +- -s COMMAND: 以非交互模式执行的 SQL 命令 +- -t: 测试服务端启动状态,状态同-k +- -w DISPLAYWIDTH: 客户端列显示宽度 +- -z TIMEZONE: 指定时区,默认为本地时区 +- -V: 打印出当前版本号 + +示例: + +```bash +taos -h h1.taos.com -s "use db; show tables;" +``` + +## 配置文件 + +也可以通过配置文件中的参数设置来控制 TDengine CLI 的行为。可用配置参数请参考[客户端配置](../taosc) + +## TDengine CLI 小技巧 + +- 可以使用上下光标键查看历史输入的指令 +- 在 TDengine CLI 中使用 `alter user` 命令可以修改用户密码,缺省密码为 `taosdata` +- Ctrl+C 中止正在进行中的查询 +- 执行 `RESET QUERY CACHE` 可清除本地表 Schema 的缓存 +- 批量执行 SQL 语句。可以将一系列的 TDengine CLI 命令(以英文 ; 结尾,每个 SQL 语句为一行)按行存放在文件里,在 TDengine CLI 里执行命令 `source ` 自动执行该文件里所有的 SQL 语句 +- 输入 `q` 或 `quit` 或 `exit` 回车,可以退出 TDengine CLI + +## TDengine CLI 导出查询结果到文件中 + +- 可以使用符号 “>>” 导出查询结果到某个文件中,语法为: sql 查询语句 >> ‘输出文件名’; 输出文件如果不写路径的话,将输出至当前目录下。如 select * from d0 >> ‘/root/d0.csv’; 将把查询结果输出到 /root/d0.csv 中。 + +## TDengine CLI 导入文件中的数据到表中 + +- 可以使用 insert into table_name file '输入文件名',把上一步中导出的数据文件再导入到指定表中。如 insert into d0 file '/root/d0.csv'; 表示把上面导出的数据全部再导致至 d0 表中。 diff --git a/docs/zh/14-reference/02-tools/09-taosdump.md b/docs/zh/14-reference/02-tools/09-taosdump.md new file mode 100644 index 0000000000..7afe8721ee --- /dev/null +++ b/docs/zh/14-reference/02-tools/09-taosdump.md @@ -0,0 +1,127 @@ +--- +title: taosdump 参考手册 +sidebar_label: taosdump +toc_max_heading_level: 4 +--- + +taosdump 是一个支持从运行中的 TDengine 集群备份数据并将备份的数据恢复到相同或另一个运行中的 TDengine 集群中的工具应用程序。 + +taosdump 可以用数据库、超级表或普通表作为逻辑数据单元进行备份,也可以对数据库、超级 +表和普通表中指定时间段内的数据记录进行备份。使用时可以指定数据备份的目录路径,如果 +不指定位置,taosdump 默认会将数据备份到当前目录。 + +如果指定的位置已经有数据文件,taosdump 会提示用户并立即退出,避免数据被覆盖。这意味着同一路径只能被用于一次备份。 +如果看到相关提示,请小心操作。 + +taosdump 是一个逻辑备份工具,它不应被用于备份任何原始数据、环境设置、 +硬件信息、服务端配置或集群的拓扑结构。taosdump 使用 +[ Apache AVRO ](https://avro.apache.org/)作为数据文件格式来存储备份数据。 + +## 安装 + +taosdump 有两种安装方式: + +- 安装 taosTools 官方安装包, 请从[发布历史页面](https://docs.taosdata.com/releases/tools/)页面找到 taosTools 并下载安装。 + +- 单独编译 taos-tools 并安装, 详情请参考 [taos-tools](https://github.com/taosdata/taos-tools) 仓库。 + +## 常用使用场景 + +### taosdump 备份数据 + +1. 备份所有数据库:指定 `-A` 或 `--all-databases` 参数; +2. 备份多个指定数据库:使用 `-D db1,db2,...` 参数; +3. 备份指定数据库中的某些超级表或普通表:使用 `dbname stbname1 stbname2 tbname1 tbname2 ...` 参数,注意这种输入序列第一个参数为数据库名称,且只支持一个数据库,第二个和之后的参数为该数据库中的超级表或普通表名称,中间以空格分隔; +4. 备份系统 log 库:TDengine 集群通常会包含一个系统数据库,名为 `log`,这个数据库内的数据为 TDengine 自我运行的数据,taosdump 默认不会对 log 库进行备份。如果有特定需求对 log 库进行备份,可以使用 `-a` 或 `--allow-sys` 命令行参数。 +5. “宽容”模式备份:taosdump 1.4.1 之后的版本提供 `-n` 参数和 `-L` 参数,用于备份数据时不使用转义字符和“宽容”模式,可以在表名、列名、标签名没使用转义字符的情况下减少备份数据时间和备份数据占用空间。如果不确定符合使用 `-n` 和 `-L` 条件时请使用默认参数进行“严格”模式进行备份。转义字符的说明请参考[官方文档](../../taos-sql/escape)。 + +:::tip +- taosdump 1.4.1 之后的版本提供 `-I` 参数,用于解析 avro 文件 schema 和数据,如果指定 `-s` 参数将只解析 schema。 +- taosdump 1.4.2 之后的备份使用 `-B` 参数指定的批次数,默认值为 16384,如果在某些环境下由于网络速度或磁盘性能不足导致 "Error actual dump .. batch .." 可以通过 `-B` 参数调整为更小的值进行尝试。 +- taosdump 的导出不支持中断恢复,所以当进程意外终止后,正确的处理方式是删除当前已导出或生成的所有相关文件。 +- taosdump 的导入支持中断恢复,但是当进程重新启动时,会收到一些“表已经存在”的提示,可以忽视。 + +::: + +### taosdump 恢复数据 + +恢复指定路径下的数据文件:使用 `-i` 参数加上数据文件所在路径。如前面提及,不应该使用同一个目录备份不同数据集合,也不应该在同一路径多次备份同一数据集,否则备份数据会造成覆盖或多次备份。 + +:::tip +taosdump 内部使用 TDengine stmt binding API 进行恢复数据的写入,为提高数据恢复性能,目前使用 16384 为一次写入批次。如果备份数据中有比较多列数据,可能会导致产生 "WAL size exceeds limit" 错误,此时可以通过使用 `-B` 参数调整为一个更小的值进行尝试。 + +::: + +## 详细命令行参数列表 + +以下为 taosdump 详细命令行参数列表: + +``` +Usage: taosdump [OPTION...] dbname [tbname ...] + or: taosdump [OPTION...] --databases db1,db2,... + or: taosdump [OPTION...] --all-databases + or: taosdump [OPTION...] -i inpath + or: taosdump [OPTION...] -o outpath + + -h, --host=HOST Server host dumping data from. Default is + localhost. + -p, --password User password to connect to server. Default is + taosdata. + -P, --port=PORT Port to connect + -u, --user=USER User name used to connect to server. Default is + root. + -c, --config-dir=CONFIG_DIR Configure directory. Default is /etc/taos + -i, --inpath=INPATH Input file path. + -o, --outpath=OUTPATH Output file path. + -r, --resultFile=RESULTFILE DumpOut/In Result file path and name. + -a, --allow-sys Allow to dump system database + -A, --all-databases Dump all databases. + -D, --databases=DATABASES Dump inputted databases. Use comma to separate + databases' name. + -e, --escape-character Use escaped character for database name + -N, --without-property Dump database without its properties. + -s, --schemaonly Only dump tables' schema. + -d, --avro-codec=snappy Choose an avro codec among null, deflate, snappy, + and lzma. + -S, --start-time=START_TIME Start time to dump. Either epoch or + ISO8601/RFC3339 format is acceptable. ISO8601 + format example: 2017-10-01T00:00:00.000+0800 or + 2017-10-0100:00:00:000+0800 or '2017-10-01 + 00:00:00.000+0800' + -E, --end-time=END_TIME End time to dump. Either epoch or ISO8601/RFC3339 + format is acceptable. ISO8601 format example: + 2017-10-01T00:00:00.000+0800 or + 2017-10-0100:00:00.000+0800 or '2017-10-01 + 00:00:00.000+0800' + -B, --data-batch=DATA_BATCH Number of data per query/insert statement when + backup/restore. Default value is 16384. If you see + 'error actual dump .. batch ..' when backup or if + you see 'WAL size exceeds limit' error when + restore, please adjust the value to a smaller one + and try. The workable value is related to the + length of the row and type of table schema. + -I, --inspect inspect avro file content and print on screen + -L, --loose-mode Using loose mode if the table name and column name + use letter and number only. Default is NOT. + -n, --no-escape No escape char '`'. Default is using it. + -Q, --dot-replace Repalce dot character with underline character in + the table name.(Version 2.5.3) + -T, --thread-num=THREAD_NUM Number of thread for dump in file. Default is + 8. + -C, --cloud=CLOUD_DSN specify a DSN to access TDengine cloud service + -R, --restful Use RESTful interface to connect TDengine + -t, --timeout=SECONDS The timeout seconds for websocket to interact. + -g, --debug Print debug info. + -?, --help Give this help list + --usage Give a short usage message + -V, --version Print program version + -W, --rename=RENAME-LIST Rename database name with new name during + importing data. RENAME-LIST: + "db1=newDB1|db2=newDB2" means rename db1 to newDB1 + and rename db2 to newDB2 (Version 2.5.4) + +Mandatory or optional arguments to long options are also mandatory or optional +for any corresponding short options. + +Report bugs to . +``` diff --git a/docs/zh/14-reference/02-tools/10-taosbenchmark.md b/docs/zh/14-reference/02-tools/10-taosbenchmark.md new file mode 100644 index 0000000000..3f15d6b8e3 --- /dev/null +++ b/docs/zh/14-reference/02-tools/10-taosbenchmark.md @@ -0,0 +1,485 @@ +--- +title: taosBenchmark 参考手册 +sidebar_label: taosBenchmark +toc_max_heading_level: 4 +--- + +taosBenchmark (曾用名 taosdemo ) 是一个用于测试 TDengine 产品性能的工具。taosBenchmark 可以测试 TDengine 的插入、查询和订阅等功能的性能,它可以模拟由大量设备产生的大量数据,还可以灵活地控制数据库、超级表、标签列的数量和类型、数据列的数量和类型、子表的数量、每张子表的数据量、插入数据的时间间隔、taosBenchmark 的工作线程数量、是否以及如何插入乱序数据等。为了兼容过往用户的使用习惯,安装包提供 了 taosdemo 作为 taosBenchmark 的软链接。 + +## 安装 + +taosBenchmark 有两种安装方式: + +- 安装 TDengine 官方安装包的同时会自动安装 taosBenchmark, 详情请参考[ TDengine 安装](../../../get-started/)。 + +- 单独编译 taos-tools 并安装, 详情请参考 [taos-tools](https://github.com/taosdata/taos-tools) 仓库。 + +## 运行 + +### 配置和运行方式 + +taosBenchmark 需要在操作系统的终端执行,该工具支持两种配置方式:[命令行参数](#命令行参数详解) 和 [JSON 配置文件](#配置文件参数详解)。这两种方式是互斥的,在使用配置文件时只能使用一个命令行参数 `-f ` 指定配置文件。在使用命令行参数运行 taosBenchmark 并控制其行为时则不能使用 `-f` 参数而要用其它参数来进行配置。除此之外,taosBenchmark 还提供了一种特殊的运行方式,即无参数运行。 + +taosBenchmark 支持对 TDengine 做完备的性能测试,其所支持的 TDengine 功能分为三大类:写入、查询和订阅。这三种功能之间是互斥的,每次运行 taosBenchmark 只能选择其中之一。值得注意的是,所要测试的功能类型在使用命令行配置方式时是不可配置的,命令行配置方式只能测试写入性能。若要测试 TDengine 的查询和订阅性能,必须使用配置文件的方式,通过配置文件中的参数 `filetype` 指定所要测试的功能类型。 + +**在运行 taosBenchmark 之前要确保 TDengine 集群已经在正确运行。** + +### 无命令行参数运行 + +执行下列命令即可快速体验 taosBenchmark 对 TDengine 进行基于默认配置的写入性能测试。 + +```bash +taosBenchmark +``` + +在无参数运行时,taosBenchmark 默认连接 `/etc/taos` 下指定的 TDengine 集群,并在 TDengine 中创建一个名为 test 的数据库,test 数据库下创建名为 meters 的一张超级表,超级表下创建 10000 张表,每张表中写入 10000 条记录。注意,如果已有 test 数据库,这个命令会先删除该数据库后建立一个全新的 test 数据库。 + +### 使用命令行配置参数运行 + +在使用命令行参数运行 taosBenchmark 并控制其行为时,`-f ` 参数不能使用。所有配置参数都必须通过命令行指定。以下是使用命令行方式测试 taosBenchmark 写入性能的一个示例。 + +```bash +taosBenchmark -I stmt -n 200 -t 100 +``` + +上面的命令 `taosBenchmark` 将创建一个名为`test`的数据库,在其中建立一张超级表`meters`,在该超级表中建立 100 张子表并使用参数绑定的方式为每张子表插入 200 条记录。 + +### 使用配置文件运行 + +taosBenchmark 安装包中提供了配置文件的示例,位于 `/examples/taosbenchmark-json` 下 + +使用如下命令行即可运行 taosBenchmark 并通过配置文件控制其行为。 + +```bash +taosBenchmark -f +``` + +**下面是几个配置文件的示例:** + +#### 插入场景 JSON 配置文件示例 + +
+insert.json + +```json +{{#include /taos-tools/example/insert.json}} +``` + +
+ +#### 查询场景 JSON 配置文件示例 + +
+query.json + +```json +{{#include /taos-tools/example/query.json}} +``` + +
+ +#### 订阅场景 JSON 配置文件示例 + +
+tmq.json + +```json +{{#include /taos-tools/example/tmq.json}} +``` + +
+ +## 命令行参数详解 + +- **-f/--file \** : + 要使用的 JSON 配置文件,由该文件指定所有参数,本参数与命令行其他参数不能同时使用。没有默认值。 + +- **-c/--config-dir \** : + TDengine 集群配置文件所在的目录,默认路径是 /etc/taos 。 + +- **-h/--host \** : + 指定要连接的 TDengine 服务端的 FQDN,默认值为 localhost 。 + +- **-P/--port \** : + 要连接的 TDengine 服务器的端口号,默认值为 6030 。 + +- **-I/--interface \** : + 插入模式,可选项有 taosc, rest, stmt, sml, sml-rest, 分别对应普通写入、restful 接口写入、参数绑定接口写入、schemaless 接口写入、restful schemaless 接口写入 (由 taosAdapter 提供)。默认值为 taosc。 + +- **-u/--user \** : + 用于连接 TDengine 服务端的用户名,默认为 root 。 + +- **-U/--supplement-insert ** : + 写入数据而不提前建数据库和表,默认关闭。 + +- **-p/--password \** : + 用于连接 TDengine 服务端的密码,默认值为 taosdata。 + +- **-o/--output \** : + 结果输出文件的路径,默认值为 ./output.txt。 + +- **-T/--thread \** : + 插入数据的线程数量,默认为 8 。 + +- **-B/--interlace-rows \** : + 启用交错插入模式并同时指定向每个子表每次插入的数据行数。交错插入模式是指依次向每张子表插入由本参数所指定的行数并重复这个过程,直到所有子表的数据都插入完成。默认值为 0, 即向一张子表完成数据插入后才会向下一张子表进行数据插入。 + +- **-i/--insert-interval \** : + 指定交错插入模式的插入间隔,单位为 ms,默认值为 0。 只有当 `-B/--interlace-rows` 大于 0 时才起作用。意味着数据插入线程在为每个子表插入隔行扫描记录后,会等待该值指定的时间间隔后再进行下一轮写入。 + +- **-r/--rec-per-req \** : + 每次向 TDengine 请求写入的数据行数,默认值为 30000 。 + +- **-t/--tables \** : + 指定子表的数量,默认为 10000 。 + +- **-S/--timestampstep \** : + 每个子表中插入数据的时间戳步长,单位是 ms,默认值是 1。 + +- **-n/--records \** : + 每个子表插入的记录数,默认值为 10000 。 + +- **-d/--database \** : + 所使用的数据库的名称,默认值为 test 。 + +- **-b/--data-type \** : + 超级表的数据列的类型。如果不使用则默认为有三个数据列,其类型分别为 FLOAT, INT, FLOAT 。 + +- **-l/--columns \** : + 超级表的数据列的总数量。如果同时设置了该参数和 `-b/--data-type`,则最后的结果列数为两者取大。如果本参数指定的数量大于 `-b/--data-type` 指定的列数,则未指定的列类型默认为 INT, 例如: `-l 5 -b float,double`, 那么最后的列为 `FLOAT,DOUBLE,INT,INT,INT`。如果 columns 指定的数量小于或等于 `-b/--data-type` 指定的列数,则结果为 `-b/--data-type` 指定的列和类型,例如: `-l 3 -b float,double,float,bigint`,那么最后的列为 `FLOAT,DOUBLE,FLOAT,BIGINT` 。 + +- **-L/--partial-col-num \ **: + 指定某些列写入数据,其他列数据为 NULL。默认所有列都写入数据。 + +- **-A/--tag-type \** : + 超级表的标签列类型。nchar 和 binary 类型可以同时设置长度,例如: + +``` +taosBenchmark -A INT,DOUBLE,NCHAR,BINARY(16) +``` + +如果没有设置标签类型,默认是两个标签,其类型分别为 INT 和 BINARY(16)。 +注意:在有的 shell 比如 bash 命令里面 “()” 需要转义,则上述指令应为: + +``` +taosBenchmark -A INT,DOUBLE,NCHAR,BINARY\(16\) +``` + +- **-w/--binwidth \**: + nchar 和 binary 类型的默认长度,默认值为 64。 + +- **-m/--table-prefix \** : + 子表名称的前缀,默认值为 "d"。 + +- **-E/--escape-character** : + 开关参数,指定在超级表和子表名称中是否使用转义字符。默认值为不使用。 + +- **-C/--chinese** : + 开关参数,指定 nchar 和 binary 是否使用 Unicode 中文字符。默认值为不使用。 + +- **-N/--normal-table** : + 开关参数,指定只创建普通表,不创建超级表。默认值为 false。仅当插入模式为 taosc, stmt, rest 模式下可以使用。 + +- **-M/--random** : + 开关参数,插入数据为生成的随机值。默认值为 false。若配置此参数,则随机生成要插入的数据。对于数值类型的 标签列/数据列,其值为该类型取值范围内的随机值。对于 NCHAR 和 BINARY 类型的 标签列/数据列,其值为指定长度范围内的随机字符串。 + +- **-x/--aggr-func** : + 开关参数,指示插入后查询聚合函数。默认值为 false。 + +- **-y/--answer-yes** : + 开关参数,要求用户在提示后确认才能继续。默认值为 false 。 + +- **-O/--disorder \** : + 指定乱序数据的百分比概率,其值域为 [0,50]。默认为 0,即没有乱序数据。 + +- **-R/--disorder-range \** : + 指定乱序数据的时间戳回退范围。所生成的乱序时间戳为非乱序情况下应该使用的时间戳减去这个范围内的一个随机值。仅在 `-O/--disorder` 指定的乱序数据百分比大于 0 时有效。 + +- **-F/--prepare_rand \** : + 生成的随机数据中唯一值的数量。若为 1 则表示所有数据都相同。默认值为 10000 。 + +- **-a/--replica \** : + 创建数据库时指定其副本数,默认值为 1 。 + +- ** -k/--keep-trying \** : 失败后进行重试的次数,默认不重试。需使用 v3.0.9 以上版本。 + +- ** -z/--trying-interval \** : 失败重试间隔时间,单位为毫秒,仅在 -k 指定重试后有效。需使用 v3.0.9 以上版本。 + +- **-v/--vgroups \** : + 创建数据库时指定 vgroups 数,仅对 TDengine v3.0+ 有效。 + +- **-V/--version** : + 显示版本信息并退出。不能与其它参数混用。 + +- **-?/--help** : + 显示帮助信息并退出。不能与其它参数混用。 + +## 配置文件参数详解 + +### 通用配置参数 + +本节所列参数适用于所有功能模式。 + +- **filetype** : 要测试的功能,可选值为 `insert`, `query` 和 `subscribe`。分别对应插入、查询和订阅功能。每个配置文件中只能指定其中之一。 +- **cfgdir** : TDengine 客户端配置文件所在的目录,默认路径是 /etc/taos 。 + +- **host** : 指定要连接的 TDengine 服务端的 FQDN,默认值为 localhost。 + +- **port** : 要连接的 TDengine 服务器的端口号,默认值为 6030。 + +- **user** : 用于连接 TDengine 服务端的用户名,默认为 root。 + +- **password** : 用于连接 TDengine 服务端的密码,默认值为 taosdata。 + +### 插入场景配置参数 + +插入场景下 `filetype` 必须设置为 `insert`,该参数及其它通用参数详见[通用配置参数](#通用配置参数) + +- ** keep_trying ** : 失败后进行重试的次数,默认不重试。需使用 v3.0.9 以上版本。 + +- ** trying_interval ** : 失败重试间隔时间,单位为毫秒,仅在 keep_trying 指定重试后有效。需使用 v3.0.9 以上版本。 +- ** childtable_from 和 childtable_to ** : 指定写入子表范围,开闭区间为 [childtable_from, childtable_to). +  +- ** continue_if_fail ** : 允许用户定义失败后行为 + + “continue_if_fail”:  “no”, 失败 taosBenchmark 自动退出,默认行为 + “continue_if_fail”: “yes”, 失败 taosBenchmark 警告用户,并继续写入 + “continue_if_fail”: “smart”, 如果子表不存在失败,taosBenchmark 会建立子表并继续写入 + +#### 数据库相关配置参数 + +创建数据库时的相关参数在 json 配置文件中的 `dbinfo` 中配置,个别具体参数如下。其余参数均与 TDengine 中 `create database` 时所指定的数据库参数相对应,详见[../../taos-sql/database] + +- **name** : 数据库名。 + +- **drop** : 插入前是否删除数据库,可选项为 "yes" 或者 "no", 为 "no" 时不创建。默认删除。 + +#### 流式计算相关配置参数 + +创建流式计算的相关参数在 json 配置文件中的 `stream` 中配置,具体参数如下。 + +- **stream_name** : 流式计算的名称,必填项。 + +- **stream_stb** : 流式计算对应的超级表名称,必填项。 + +- **stream_sql** : 流式计算的sql语句,必填项。 + +- **trigger_mode** : 流式计算的触发模式,可选项。 + +- **watermark** : 流式计算的水印,可选项。 + +- **drop** : 是否创建流式计算,可选项为 "yes" 或者 "no", 为 "no" 时不创建。 + +#### 超级表相关配置参数 + +创建超级表时的相关参数在 json 配置文件中的 `super_tables` 中配置,具体参数如下。 + +- **name**: 超级表名,必须配置,没有默认值。 + +- **child_table_exists** : 子表是否已经存在,默认值为 "no",可选值为 "yes" 或 "no"。 + +- **child_table_count** : 子表的数量,默认值为 10。 + +- **child_table_prefix** : 子表名称的前缀,必选配置项,没有默认值。 + +- **escape_character** : 超级表和子表名称中是否包含转义字符,默认值为 "no",可选值为 "yes" 或 "no"。 + +- **auto_create_table** : 仅当 insert_mode 为 taosc, rest, stmt 并且 child_table_exists 为 "no" 时生效,该参数为 "yes" 表示 taosBenchmark 在插入数据时会自动创建不存在的表;为 "no" 则表示先提前建好所有表再进行插入。 + +- **batch_create_tbl_num** : 创建子表时每批次的建表数量,默认为 10。注:实际的批数不一定与该值相同,当执行的 SQL 语句大于支持的最大长度时,会自动截断再执行,继续创建。 + +- **data_source** : 数据的来源,默认为 taosBenchmark 随机产生,可以配置为 "rand" 和 "sample"。为 "sample" 时使用 sample_file 参数指定的文件内的数据。 + +- **insert_mode** : 插入模式,可选项有 taosc, rest, stmt, sml, sml-rest, 分别对应普通写入、restful 接口写入、参数绑定接口写入、schemaless 接口写入、restful schemaless 接口写入 (由 taosAdapter 提供)。默认值为 taosc 。 + +- **non_stop_mode** : 指定是否持续写入,若为 "yes" 则 insert_rows 失效,直到 Ctrl + C 停止程序,写入才会停止。默认值为 "no",即写入指定数量的记录后停止。注:即使在持续写入模式下 insert_rows 失效,但其也必须被配置为一个非零正整数。 + +- **line_protocol** : 使用行协议插入数据,仅当 insert_mode 为 sml 或 sml-rest 时生效,可选项为 line, telnet, json。 + +- **tcp_transfer** : telnet 模式下的通信协议,仅当 insert_mode 为 sml-rest 并且 line_protocol 为 telnet 时生效。如果不配置,则默认为 http 协议。 + +- **insert_rows** : 每个子表插入的记录数,默认为 0 。 + +- **childtable_offset** : 仅当 child_table_exists 为 yes 时生效,指定从超级表获取子表列表时的偏移量,即从第几个子表开始。 + +- **childtable_limit** : 仅当 child_table_exists 为 yes 时生效,指定从超级表获取子表列表的上限。 + +- **interlace_rows** : 启用交错插入模式并同时指定向每个子表每次插入的数据行数。交错插入模式是指依次向每张子表插入由本参数所指定的行数并重复这个过程,直到所有子表的数据都插入完成。默认值为 0, 即向一张子表完成数据插入后才会向下一张子表进行数据插入。 + +- **insert_interval** : 指定交错插入模式的插入间隔,单位为 ms,默认值为 0。 只有当 `-B/--interlace-rows` 大于 0 时才起作用。意味着数据插入线程在为每个子表插入隔行扫描记录后,会等待该值指定的时间间隔后再进行下一轮写入。 + +- **partial_col_num** : 若该值为正数 n 时, 则仅向前 n 列写入,仅当 insert_mode 为 taosc 和 rest 时生效,如果 n 为 0 则是向全部列写入。 + +- **disorder_ratio** : 指定乱序数据的百分比概率,其值域为 [0,50]。默认为 0,即没有乱序数据。 + +- **disorder_range** : 指定乱序数据的时间戳回退范围。所生成的乱序时间戳为非乱序情况下应该使用的时间戳减去这个范围内的一个随机值。仅在 `-O/--disorder` 指定的乱序数据百分比大于 0 时有效。 + +- **timestamp_step** : 每个子表中插入数据的时间戳步长,单位与数据库的 `precision` 一致,默认值是 1。 + +- **start_timestamp** : 每个子表的时间戳起始值,默认值是 now。 + +- **sample_format** : 样本数据文件的类型,现在只支持 "csv" 。 + +- **sample_file** : 指定 csv 格式的文件作为数据源,仅当 data_source 为 sample 时生效。若 csv 文件内的数据行数小于等于 prepared_rand,那么会循环读取 csv 文件数据直到与 prepared_rand 相同;否则则会只读取 prepared_rand 个数的行的数据。也即最终生成的数据行数为二者取小。 + +- **use_sample_ts** : 仅当 data_source 为 sample 时生效,表示 sample_file 指定的 csv 文件内是否包含第一列时间戳,默认为 no。 若设置为 yes, 则使用 csv 文件第一列作为时间戳,由于同一子表时间戳不能重复,生成的数据量取决于 csv 文件内的数据行数相同,此时 insert_rows 失效。 + +- **tags_file** : 仅当 insert_mode 为 taosc, rest 的模式下生效。 最终的 tag 的数值与 childtable_count 有关,如果 csv 文件内的 tag 数据行小于给定的子表数量,那么会循环读取 csv 文件数据直到生成 childtable_count 指定的子表数量;否则则只会读取 childtable_count 行 tag 数据。也即最终生成的子表数量为二者取小。 + +- **primary_key** : 指定超级表是否有复合主键,取值 1 和 0, 复合主键列只能是超级表的第二列,指定生成复合主键后要确保第二列符合复合主键的数据类型,否则会报错 +- **repeat_ts_min** : 数值类型,复合主键开启情况下指定生成相同时间戳记录的最小个数,生成相同时间戳记录的个数是在范围[repeat_ts_min, repeat_ts_max] 内的随机值, 最小值等于最大值时为固定个数 +- **repeat_ts_max** : 数值类型,复合主键开启情况下指定生成相同时间戳记录的最大个数 +- **sqls** : 字符串数组类型,指定超级表创建成功后要执行的 sql 数组,sql 中指定表名前面要带数据库名,否则会报未指定数据库错误 + +#### tsma配置参数 + +指定tsma的配置参数在 `super_tables` 中的 `tsmas` 中,具体参数如下。 + +- **name** : 指定 tsma 的名字,必选项。 + +- **function** : 指定 tsma 的函数,必选项。 + +- **interval** : 指定 tsma 的时间间隔,必选项。 + +- **sliding** : 指定 tsma 的窗口时间位移,必选项。 + +- **custom** : 指定 tsma 的创建语句结尾追加的自定义配置,可选项。 + +- **start_when_inserted** : 指定当插入多少行时创建 tsma,可选项,默认为 0。 + +#### 标签列与数据列配置参数 + +指定超级表标签列与数据列的配置参数分别在 `super_tables` 中的 `columns` 和 `tag` 中。 + +- **type** : 指定列类型,可选值请参考 TDengine 支持的数据类型。 + 注:JSON 数据类型比较特殊,只能用于标签,当使用 JSON 类型作为 tag 时有且只能有这一个标签,此时 count 和 len 代表的意义分别是 JSON tag 内的 key-value pair 的个数和每个 KV pair 的 value 的值的长度,value 默认为 string。 + +- **len** : 指定该数据类型的长度,对 NCHAR,BINARY 和 JSON 数据类型有效。如果对其他数据类型配置了该参数,若为 0 , 则代表该列始终都是以 null 值写入;如果不为 0 则被忽略。 + +- **count** : 指定该类型列连续出现的数量,例如 "count": 4096 即可生成 4096 个指定类型的列。 + +- **name** : 列的名字,若与 count 同时使用,比如 "name":"current", "count":3, 则 3 个列的名字分别为 current, current_2. current_3。 + +- **min** : 数据类型的 列/标签 的最小值。生成的值将大于或等于最小值。 + +- **max** : 数据类型的 列/标签 的最大值。生成的值将小于最小值。 + +- **fun** : 此列数据以函数填充,目前只支持 sin 和 cos 两函数,输入参数为时间戳换算成角度值,换算公式: 角度 x = 输入的时间列ts值 % 360。同时支持系数调节,随机波动因子调节,以固定格式的表达式展现,如 fun=“10\*sin(x)+100\*random(5)” , x 表示角度,取值 0 ~ 360度,增长步长与时间列步长一致。10 表示乘的系数,100 表示加或减的系数,5 表示波动幅度在 5% 的随机范围内。目前支持的数据类型为 int, bigint, float, double 四种数据类型。注意:表达式为固定模式,不可前后颠倒。 + +- **values** : nchar/binary 列/标签的值域,将从值中随机选择。 + +- **sma**: 将该列加入 SMA 中,值为 "yes" 或者 "no",默认为 "no"。 + +- **encode**: 字符串类型,指定此列两级压缩中的第一级编码算法,详细参见创建超级表 + +- **compress**: 字符串类型,指定此列两级压缩中的第二级加密算法,详细参见创建超级表 + +- **level**: 字符串类型,指定此列两级压缩中的第二级加密算法的压缩率高低,详细参见创建超级表 + +- **gen**: 字符串类型,指定此列生成数据的方式,不指定为随机,若指定为 “order”, 会按自然数顺序增长 + +- **fillNull**: 字符串类型,指定此列是否随机插入 NULL 值,可指定为 “true” 或 "false", 只有当 generate_row_rule 为 2 时有效 + +#### 插入行为配置参数 + +- **thread_count** : 插入数据的线程数量,默认为 8。 + +- **thread_bind_vgroup** : 写入时 vgroup 是否和写入线程绑定,绑定后可提升写入速度, 取值为 "yes" 或 "no",默认值为 “no”, 设置为 “no” 后与原来行为一致。 当设为 “yes” 时,如果 thread_count 数量大小写入数据库的 vgroups 数量, thread_count 自动调整为 vgroups 数量;如果 thread_count 数量小于 vgroups 数量,写入线程数量不做调整,一个线程写完一个 vgroup 数据后再写下一个,同时保持一个 vgroup 同时只能由一个线程写入的规则。 + +- **create_table_thread_count** : 建表的线程数量,默认为 8。 + +- **connection_pool_size** : 预先建立的与 TDengine 服务端之间的连接的数量。若不配置,则与所指定的线程数相同。 + +- **result_file** : 结果输出文件的路径,默认值为 ./output.txt。 + +- **confirm_parameter_prompt** : 开关参数,要求用户在提示后确认才能继续。默认值为 false 。 + +- **interlace_rows** : 启用交错插入模式并同时指定向每个子表每次插入的数据行数。交错插入模式是指依次向每张子表插入由本参数所指定的行数并重复这个过程,直到所有子表的数据都插入完成。默认值为 0, 即向一张子表完成数据插入后才会向下一张子表进行数据插入。 + 在 `super_tables` 中也可以配置该参数,若配置则以 `super_tables` 中的配置为高优先级,覆盖全局设置。 + +- **insert_interval** : + 指定交错插入模式的插入间隔,单位为 ms,默认值为 0。 只有当 `-B/--interlace-rows` 大于 0 时才起作用。意味着数据插入线程在为每个子表插入隔行扫描记录后,会等待该值指定的时间间隔后再进行下一轮写入。 + 在 `super_tables` 中也可以配置该参数,若配置则以 `super_tables` 中的配置为高优先级,覆盖全局设置。 + +- **num_of_records_per_req** : + 每次向 TDengine 请求写入的数据行数,默认值为 30000 。当其设置过大时,TDengine 客户端驱动会返回相应的错误信息,此时需要调低这个参数的设置以满足写入要求。 + +- **prepare_rand** : 生成的随机数据中唯一值的数量。若为 1 则表示所有数据都相同。默认值为 10000 。 + +- **pre_load_tb_meta** :是否提前加载子表的 meta 数据,取值为 “yes” or "no"。当子表数量非常多时,打开此选项可提高写入速度。 + +### 查询场景配置参数 + +查询场景下 `filetype` 必须设置为 `query`。 +`query_times` 指定运行查询的次数,数值类型 + +查询场景可以通过设置 `kill_slow_query_threshold` 和 `kill_slow_query_interval` 参数来控制杀掉慢查询语句的执行,threshold 控制如果 exec_usec 超过指定时间的查询将被 taosBenchmark 杀掉,单位为秒;interval 控制休眠时间,避免持续查询慢查询消耗 CPU ,单位为秒。 + +其它通用参数详见[通用配置参数](#通用配置参数)。 + +#### 执行指定查询语句的配置参数 + +查询指定表(可以指定超级表、子表或普通表)的配置参数在 `specified_table_query` 中设置。 + +- **query_interval** : 查询时间间隔,单位是秒,默认值为 0。 + +- **threads** : 执行查询 SQL 的线程数,默认值为 1。 + +- **sqls**: + - **sql**: 执行的 SQL 命令,必填。 + - **result**: 保存查询结果的文件,未指定则不保存。 + +#### 查询超级表的配置参数 + +查询超级表的配置参数在 `super_table_query` 中设置。 + +- **stblname** : 指定要查询的超级表的名称,必填。 + +- **query_interval** : 查询时间间隔,单位是秒,默认值为 0。 + +- **threads** : 执行查询 SQL 的线程数,默认值为 1。 + +- **sqls** : + - **sql** : 执行的 SQL 命令,必填;对于超级表的查询 SQL,在 SQL 命令中保留 "xxxx",程序会自动将其替换为超级表的所有子表名。 + 替换为超级表中所有的子表名。 + - **result** : 保存查询结果的文件,未指定则不保存。 + +### 订阅场景配置参数 + +订阅场景下 `filetype` 必须设置为 `subscribe`,该参数及其它通用参数详见[通用配置参数](#通用配置参数) + +#### 执行指定订阅语句的配置参数 + +订阅指定表(可以指定超级表、子表或者普通表)的配置参数在 `specified_table_query` 中设置。 + +- **threads/concurrent** : 执行 SQL 的线程数,默认为 1。 + +- **sqls** : + - **sql** : 执行的 SQL 命令,必填。 + + +#### 配置文件中数据类型书写对照表 + +| # | **引擎** | **taosBenchmark** +| --- | :----------------: | :---------------: +| 1 | TIMESTAMP | timestamp +| 2 | INT | int +| 3 | INT UNSIGNED | uint +| 4 | BIGINT | bigint +| 5 | BIGINT UNSIGNED | ubigint +| 6 | FLOAT | float +| 7 | DOUBLE | double +| 8 | BINARY | binary +| 9 | SMALLINT | smallint +| 10 | SMALLINT UNSIGNED | usmallint +| 11 | TINYINT | tinyint +| 12 | TINYINT UNSIGNED | utinyint +| 13 | BOOL | bool +| 14 | NCHAR | nchar +| 15 | VARCHAR | varchar +| 15 | JSON | json + +注意:taosBenchmark 配置文件中数据类型必须小写方可识别 + + + diff --git a/docs/zh/14-reference/02-tools/index.md b/docs/zh/14-reference/02-tools/index.md new file mode 100644 index 0000000000..37ed3a460e --- /dev/null +++ b/docs/zh/14-reference/02-tools/index.md @@ -0,0 +1,13 @@ +--- +title: 工具 +description: TDengine 工具 +--- + +本节详细说明 TDengine 中的主要工具的功能和用法。 + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` \ No newline at end of file