From 572bcb14d319d6c1c47ca10e770b399dc947e51f Mon Sep 17 00:00:00 2001 From: Leto_b Date: Thu, 27 Feb 2025 09:52:35 +0800 Subject: [PATCH] add chapter number in table doc-en --- .../Table/API/Programming-JDBC_timecho.md | 13 +- .../Programming-Java-Native-API_timecho.md | 19 +-- .../API/Programming-Python-Native-API.md | 17 +-- src/UserGuide/Master/Table/API/RestAPI-V1.md | 87 ++++++------ .../Cluster-Concept_apache.md | 32 ++--- .../Cluster-Concept_timecho.md | 34 ++--- .../Data-Model-and-Terminology_apache.md | 6 +- .../Data-Model-and-Terminology_timecho.md | 6 +- .../Table/Background-knowledge/Data-Type.md | 4 +- .../Cluster-Deployment_apache.md | 44 ++++-- .../Cluster-Deployment_timecho.md | 43 ++++-- .../Database-Resources.md | 10 +- .../Deployment-form_apache.md | 6 +- .../Deployment-form_timecho.md | 8 +- .../Docker-Deployment_apache.md | 8 +- .../Docker-Deployment_timecho.md | 6 +- .../Dual-Active-Deployment_timecho.md | 16 +-- .../Environment-Requirements.md | 6 +- .../IoTDB-Package_apache.md | 4 +- .../IoTDB-Package_timecho.md | 4 +- .../Monitoring-panel-deployment.md | 19 +-- .../Stand-Alone-Deployment_apache.md | 8 +- .../Stand-Alone-Deployment_timecho.md | 8 +- ...apache.md => IoTDB-Introduction_apache.md} | 8 +- ...mecho.md => IoTDB-Introduction_timecho.md} | 17 +-- .../Release-history_timecho.md | 25 ++-- .../Table/IoTDB-Introduction/Scenario.md | 31 ++-- .../Table/QuickStart/QuickStart_apache.md | 6 +- .../Table/QuickStart/QuickStart_timecho.md | 8 +- .../Master/Table/Reference/Sample-Data.md | 5 +- .../Master/Table/Reference/Status-Codes.md | 22 +++ .../Table/Reference/System-Config-Manual.md | 116 +++++++++------ .../Master/Table/SQL-Manual/Basis-Function.md | 134 +++++++++--------- .../Table/SQL-Manual/Featured-Functions.md | 109 +++++++------- .../Master/Table/SQL-Manual/Fill-Clause.md | 10 +- .../Table/SQL-Manual/From-Join-Clause.md | 8 +- .../Master/Table/SQL-Manual/GroupBy-Clause.md | 6 +- .../Master/Table/SQL-Manual/Having-Clause.md | 4 +- .../Master/Table/SQL-Manual/Identifier.md | 4 +- .../Table/SQL-Manual/Limit-Offset-Clause.md | 4 +- .../Master/Table/SQL-Manual/OrderBy-Clause.md | 4 +- .../Master/Table/SQL-Manual/Select-Clause.md | 8 +- .../Master/Table/SQL-Manual/Where-Clause.md | 4 +- .../Master/Table/SQL-Manual/overview.md | 2 +- .../Cluster-data-partitioning.md | 30 ++-- .../Encoding-and-Compression.md | 11 +- .../Master/Table/Tools-System/Benchmark.md | 9 +- .../Master/Table/Tools-System/CLI.md | 13 +- .../Tools-System/Maintenance-Tool_apache.md | 18 +-- .../Tools-System/Maintenance-Tool_timecho.md | 35 ++--- .../Table/Tools-System/Monitor-Tool_apache.md | 18 +-- .../Tools-System/Monitor-Tool_timecho.md | 21 +-- .../Table/User-Manual/Data-Sync_apache.md | 10 +- .../Table/User-Manual/Data-Sync_timecho.md | 10 +- .../User-Manual/Query-Performance-Analysis.md | 21 +-- .../User-Manual/Tiered-Storage_timecho.md | 9 +- .../API/Programming-JDBC_timecho.md | 13 +- .../Programming-Java-Native-API_timecho.md | 19 +-- .../API/Programming-Python-Native-API.md | 17 +-- src/UserGuide/latest-Table/API/RestAPI-V1.md | 87 ++++++------ .../Cluster-Concept_apache.md | 32 ++--- .../Cluster-Concept_timecho.md | 34 ++--- .../Data-Model-and-Terminology_apache.md | 6 +- .../Data-Model-and-Terminology_timecho.md | 6 +- .../Background-knowledge/Data-Type.md | 4 +- .../Cluster-Deployment_apache.md | 12 +- .../Cluster-Deployment_timecho.md | 12 +- .../Database-Resources.md | 10 +- .../Deployment-form_apache.md | 6 +- .../Deployment-form_timecho.md | 8 +- .../Docker-Deployment_apache.md | 8 +- .../Docker-Deployment_timecho.md | 6 +- .../Dual-Active-Deployment_timecho.md | 16 +-- .../Environment-Requirements.md | 6 +- .../IoTDB-Package_apache.md | 4 +- .../IoTDB-Package_timecho.md | 4 +- .../Monitoring-panel-deployment.md | 19 +-- .../Stand-Alone-Deployment_apache.md | 8 +- .../Stand-Alone-Deployment_timecho.md | 8 +- ...apache.md => IoTDB-Introduction_apache.md} | 8 +- ...mecho.md => IoTDB-Introduction_timecho.md} | 17 +-- .../Release-history_timecho.md | 25 ++-- .../IoTDB-Introduction/Scenario.md | 31 ++-- .../QuickStart/QuickStart_apache.md | 6 +- .../QuickStart/QuickStart_timecho.md | 8 +- .../latest-Table/Reference/Sample-Data.md | 5 +- .../latest-Table/Reference/Status-Codes.md | 22 +++ .../Reference/System-Config-Manual.md | 116 +++++++++------ .../latest-Table/SQL-Manual/Basis-Function.md | 134 +++++++++--------- .../SQL-Manual/Featured-Functions.md | 117 +++++++-------- .../latest-Table/SQL-Manual/Fill-Clause.md | 10 +- .../SQL-Manual/From-Join-Clause.md | 8 +- .../latest-Table/SQL-Manual/GroupBy-Clause.md | 6 +- .../latest-Table/SQL-Manual/Having-Clause.md | 4 +- .../latest-Table/SQL-Manual/Identifier.md | 4 +- .../SQL-Manual/Limit-Offset-Clause.md | 4 +- .../latest-Table/SQL-Manual/OrderBy-Clause.md | 4 +- .../latest-Table/SQL-Manual/Select-Clause.md | 8 +- .../latest-Table/SQL-Manual/Where-Clause.md | 4 +- .../latest-Table/SQL-Manual/overview.md | 2 +- .../Cluster-data-partitioning.md | 30 ++-- .../Encoding-and-Compression.md | 11 +- .../latest-Table/Tools-System/Benchmark.md | 9 +- .../latest-Table/Tools-System/CLI.md | 13 +- .../Tools-System/Maintenance-Tool_apache.md | 18 +-- .../Tools-System/Maintenance-Tool_timecho.md | 35 ++--- .../Tools-System/Monitor-Tool_apache.md | 18 +-- .../Tools-System/Monitor-Tool_timecho.md | 21 +-- .../User-Manual/Data-Sync_apache.md | 10 +- .../User-Manual/Data-Sync_timecho.md | 10 +- .../User-Manual/Query-Performance-Analysis.md | 21 +-- .../User-Manual/Tiered-Storage_timecho.md | 9 +- 112 files changed, 1187 insertions(+), 1054 deletions(-) rename src/UserGuide/Master/Table/IoTDB-Introduction/{IoTDB-Introduce_apache.md => IoTDB-Introduction_apache.md} (98%) rename src/UserGuide/Master/Table/IoTDB-Introduction/{IoTDB-Introduce_timecho.md => IoTDB-Introduction_timecho.md} (97%) rename src/UserGuide/latest-Table/IoTDB-Introduction/{IoTDB-Introduce_apache.md => IoTDB-Introduction_apache.md} (98%) rename src/UserGuide/latest-Table/IoTDB-Introduction/{IoTDB-Introduce_timecho.md => IoTDB-Introduction_timecho.md} (97%) diff --git a/src/UserGuide/Master/Table/API/Programming-JDBC_timecho.md b/src/UserGuide/Master/Table/API/Programming-JDBC_timecho.md index 8779ec5f8..574b13826 100644 --- a/src/UserGuide/Master/Table/API/Programming-JDBC_timecho.md +++ b/src/UserGuide/Master/Table/API/Programming-JDBC_timecho.md @@ -18,19 +18,20 @@ under the License. --> +# JDBC The IoTDB JDBC provides a standardized way to interact with the IoTDB database, allowing users to execute SQL statements from Java programs for managing databases and time-series data. It supports operations such as connecting to the database, creating, querying, updating, and deleting data, as well as batch insertion and querying of time-series data. **Note:** The current JDBC implementation is designed primarily for integration with third-party tools. High-performance writing **may not be achieved** when using JDBC for insert operations. For Java applications, it is recommended to use the **JAVA Native API** for optimal performance. -## Prerequisites +## 1. Prerequisites -### **Environment Requirements** +### 1.1 **Environment Requirements** - **JDK:** Version 1.8 or higher - **Maven:** Version 3.6 or higher -### **Adding Maven Dependencies** +### 1.2 **Adding Maven Dependencies** Add the following dependency to your Maven `pom.xml` file: @@ -44,13 +45,13 @@ Add the following dependency to your Maven `pom.xml` file: ``` -## Read and Write Operations +## 2. Read and Write Operations **Write Operations:** Perform database operations such as inserting data, creating databases, and creating time-series using the `execute` method. **Read Operations:** Execute queries using the `executeQuery` method and retrieve results via the `ResultSet` object. -### Method Overview +### 2.1 Method Overview | **Method Name** | **Description** | **Parameters** | **Return Value** | | ------------------------------------------------------------ | ----------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------- | @@ -63,7 +64,7 @@ Add the following dependency to your Maven `pom.xml` file: | ResultSet.next() | Moves to the next row in the result set | None | `boolean`: Whether the move was successful | | ResultSet.getString(int columnIndex) | Retrieves the string value of a specified column | `columnIndex`: Column index (starting from 1) | `String`: Column value | -## Sample Code +## 3. Sample Code **Note:** When using the Table Model, you must specify the `sql_dialect` parameter as `table` in the URL. Example: diff --git a/src/UserGuide/Master/Table/API/Programming-Java-Native-API_timecho.md b/src/UserGuide/Master/Table/API/Programming-Java-Native-API_timecho.md index c97f50769..6fbd64539 100644 --- a/src/UserGuide/Master/Table/API/Programming-Java-Native-API_timecho.md +++ b/src/UserGuide/Master/Table/API/Programming-Java-Native-API_timecho.md @@ -18,17 +18,18 @@ under the License. --> +# Java Native API IoTDB provides a Java native client driver and a session pool management mechanism. These tools enable developers to interact with IoTDB using object-oriented APIs, allowing time-series objects to be directly assembled and inserted into the database without constructing SQL statements. It is recommended to use the `ITableSessionPool` for multi-threaded database operations to maximize efficiency. -## Prerequisites +## 1. Prerequisites -### Environment Requirements +### 1.1 Environment Requirements - **JDK**: Version 1.8 or higher - **Maven**: Version 3.6 or higher -### Adding Maven Dependencies +### 1.2 Adding Maven Dependencies ```XML @@ -40,9 +41,9 @@ IoTDB provides a Java native client driver and a session pool management mechani ``` -## Read and Write Operations +## 2. Read and Write Operations -### ITableSession Interface +### 2.1 ITableSession Interface The `ITableSession` interface defines basic operations for interacting with IoTDB, including data insertion, query execution, and session closure. Note that this interface is **not thread-safe**. @@ -124,7 +125,7 @@ public interface ITableSession extends AutoCloseable { } ``` -### TableSessionBuilder Class +### 2.2 TableSessionBuilder Class The `TableSessionBuilder` class is a builder for configuring and creating instances of the `ITableSession` interface. It allows developers to set connection parameters, query parameters, and security features. @@ -336,9 +337,9 @@ public class TableSessionBuilder { } ``` -## Session Pool +## 3. Session Pool -### ITableSessionPool Interface +### 3.1 ITableSessionPool Interface The `ITableSessionPool` interface manages a pool of `ITableSession` instances, enabling efficient reuse of connections and proper cleanup of resources. @@ -378,7 +379,7 @@ public interface ITableSessionPool { } ``` -### TableSessionPoolBuilder Class +### 3.2 ableSessionPoolBuilder Class The `TableSessionPoolBuilder` class is a builder for configuring and creating `ITableSessionPool` instances, supporting options like connection settings and pooling behavior. diff --git a/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md b/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md index 5ed77d6da..e2a9aaa62 100644 --- a/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md +++ b/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md @@ -18,10 +18,11 @@ under the License. --> +# Python Native API IoTDB provides a Python native client driver and a session pool management mechanism. These tools allow developers to interact with IoTDB in a programmatic and efficient manner. Using the Python API, developers can encapsulate time-series data into objects (e.g., `Tablet`, `NumpyTablet`) and insert them into the database directly, without the need to manually construct SQL statements. For multi-threaded operations, the `TableSessionPool` is recommended to optimize resource utilization and enhance performance. -## Prerequisites +## 1. Prerequisites To use the IoTDB Python API, install the required package using pip: @@ -29,9 +30,9 @@ To use the IoTDB Python API, install the required package using pip: pip3 install apache-iotdb ``` -## Read and Write Operations +## 2. Read and Write Operations -### TableSession +### 2.1 TableSession `TableSession` is a core class in IoTDB, enabling users to interact with the IoTDB database. It provides methods to execute SQL statements, insert data, and manage database sessions. @@ -101,7 +102,7 @@ def close(self): pass ``` -### TableSessionConfig +### 2.2 TableSessionConfig `TableSessionConfig` is a configuration class that sets parameters for creating a `TableSession` instance, defining essential settings for connecting to the IoTDB database. @@ -159,9 +160,9 @@ class TableSessionConfig(object): **Note:** After using a `TableSession`, make sure to call the `close` method to release resources. -## Session Pool +## 3. Session Pool -### TableSessionPool +### 3.1 TableSessionPool `TableSessionPool` is a session pool management class designed for creating and managing `TableSession` instances. It provides functionality to retrieve sessions from the pool and close the pool when it is no longer needed. @@ -200,7 +201,7 @@ def close(self): """ ``` -### TableSessionPoolConfig +### 3.2 TableSessionPoolConfig `TableSessionPoolConfig` is a configuration class used to define parameters for initializing and managing a `TableSessionPool` instance. It specifies the settings needed for efficient session pool management in IoTDB. @@ -276,7 +277,7 @@ class TableSessionPoolConfig(object): - Ensure that `TableSession` instances retrieved from the `TableSessionPool` are properly closed after use. - After closing the `TableSessionPool`, it will no longer be possible to retrieve new sessions. -## Sample Code +## 4. Sample Code **Session** Example: You can find the full example code at [GitHub Repository](https://github.com/apache/iotdb/blob/master/iotdb-client/client-py/table_model_session_example.py). diff --git a/src/UserGuide/Master/Table/API/RestAPI-V1.md b/src/UserGuide/Master/Table/API/RestAPI-V1.md index 77983bbf3..d4224bc35 100644 --- a/src/UserGuide/Master/Table/API/RestAPI-V1.md +++ b/src/UserGuide/Master/Table/API/RestAPI-V1.md @@ -18,10 +18,11 @@ under the License. --> +# RestAPI V1 IoTDB's RESTful service can be used for querying, writing, and management operations. It uses the OpenAPI standard to define interfaces and generate frameworks. -### Enabling RESTful Service +## 1. Enabling RESTful Service The RESTful service is disabled by default. To enable it, locate the `conf/iotdb-system.properties` file in the IoTDB installation directory, set `enable_rest_service` to `true`, and then restart the datanode process. @@ -29,7 +30,7 @@ The RESTful service is disabled by default. To enable it, locate the `conf/iotdb enable_rest_service=true ``` -### Authentication +## 2. Authentication Except for the health check endpoint `/ping`, the RESTful service uses basic authentication. Each URL request must include the header `'Authorization':'Basic' + base64.encode(username + ':' + password)`. @@ -59,9 +60,9 @@ Authorization : Basic cm9vdDpyb290 {"code":800,"message":"INIT_AUTH_ERROR"} ``` -### Interface Definitions +## 3. Interface Definitions -#### Ping +### 3.1 Ping The `/ping` endpoint can be used for online service health checks. @@ -71,9 +72,9 @@ The `/ping` endpoint can be used for online service health checks. - Example Request: - ```Shell + ```Bash curl http://127.0.0.1:18080/ping - ``` + ``` - HTTP Status Codes: @@ -102,7 +103,7 @@ The `/ping` endpoint can be used for online service health checks. **Note**: The `/ping` endpoint does not require authentication. -#### Query Interface +### 3.2 Query Interface - Request Path: `/rest/table/v1/query` @@ -130,9 +131,9 @@ The `/ping` endpoint can be used for online service health checks. - Example Request: - ```JSON + ```Bash curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X POST --data '{"database":"test","sql":"select s1,s2,s3 from test_table"}' http://127.0.0.1:18080/rest/table/v1/query - ``` + ``` - Example Response: @@ -161,9 +162,9 @@ The `/ping` endpoint can be used for online service health checks. ] ] } - ``` + ``` -#### Non-Query Interface +### 3.3 Non-Query Interface - Request Path: `/rest/table/v1/nonQuery` @@ -208,9 +209,9 @@ The `/ping` endpoint can be used for online service health checks. "code": 200, "message": "SUCCESS_STATUS" } - ``` + ``` -#### Batch Write Interface +### 3.4 Batch Write Interface - Request Path: `/rest/table/v1/insertTablet` @@ -241,9 +242,9 @@ The `/ping` endpoint can be used for online service health checks. - Example Request: - ```JSON + ```Bash curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X POST --data '{"database":"test","column_catogories":["TAG","FIELD","FIELD"],"timestamps":[1739702535000,1739789055000],"column_names":["s1","s2","s3"],"data_types":["STRING","BOOLEAN","INT32"],"values":[["a11",true,2024],["a11",false,2025]],"table":"test_table"}' http://127.0.0.1:18080/rest/table/v1/insertTablet - ``` + ``` - Example Response: @@ -252,86 +253,86 @@ The `/ping` endpoint can be used for online service health checks. "code": 200, "message": "SUCCESS_STATUS" } - ``` + ``` -### Configuration +## 4. Configuration The configuration file is located in `iotdb-system.properties`. - Set `enable_rest_service` to `true` to enable the module, or `false` to disable it. The default value is `false`. - ```Plain + ```Properties enable_rest_service=true - ``` + ``` - Only effective when `enable_rest_service=true`. Set `rest_service_port` to a number (1025~65535) to customize the REST service socket port. The default value is `18080`. - ```Plain + ```Properties rest_service_port=18080 - ``` + ``` - Set `enable_swagger` to `true` to enable Swagger for displaying REST interface information, or `false` to disable it. The default value is `false`. - ```Plain + ```Properties enable_swagger=false - ``` + ``` - The maximum number of rows that can be returned in a single query. If the result set exceeds this limit, only the rows within the limit will be returned, and status code `411` will be returned. - ```Plain + ```Properties rest_query_default_row_size_limit=10000 - ``` + ``` - Expiration time for caching client login information (used to speed up user authentication, in seconds, default is 8 hours). - ```Plain + ```Properties cache_expire_in_seconds=28800 - ``` + ``` - Maximum number of users stored in the cache (default is 100). - ```Plain + ```Properties cache_max_num=100 - ``` + ``` - Initial cache capacity (default is 10). - ```Plain + ```Properties cache_init_num=10 - ``` + ``` - Whether to enable SSL configuration for the REST service. Set `enable_https` to `true` to enable it, or `false` to disable it. The default value is `false`. - ```Plain + ```Properties enable_https=false - ``` + ``` - Path to the `keyStore` (optional). - ```Plain + ```Properties key_store_path= - ``` + ``` - Password for the `keyStore` (optional). - ```Plain + ```Properties key_store_pwd= - ``` + ``` - Path to the `trustStore` (optional). - ```Plain + ```Properties trust_store_path="" - ``` + ``` - Password for the `trustStore` (optional). - ```Plain + ```Properties trust_store_pwd="" - ``` + ``` - SSL timeout time, in seconds. - ```Plain + ```Properties idle_timeout_in_seconds=5000 - ``` \ No newline at end of file + ``` \ No newline at end of file diff --git a/src/UserGuide/Master/Table/Background-knowledge/Cluster-Concept_apache.md b/src/UserGuide/Master/Table/Background-knowledge/Cluster-Concept_apache.md index e6fec93e8..b61ac6f7a 100644 --- a/src/UserGuide/Master/Table/Background-knowledge/Cluster-Concept_apache.md +++ b/src/UserGuide/Master/Table/Background-knowledge/Cluster-Concept_apache.md @@ -21,9 +21,9 @@ # Common Concept -## SQL Dialect Related Concepts +## 1. SQL Dialect Related Concepts -### sql_dialect +### 1.1 sql_dialect IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points: @@ -32,34 +32,34 @@ IoTDB supports two time-series data models (SQL dialects), both managing devices Each dialect comes with its own SQL syntax and query patterns tailored to its data model. -### Schema +### 1.2 Schema Schema refers to the metadata structure of the database, which can follow either a tree or table format. It includes definitions such as measurement point names, data types, and storage configurations. -### Device +### 1.3 Device A device corresponds to a physical device in a real-world scenario, typically associated with multiple measurement points. -### Timeseries +### 1.4 Timeseries Also referred to as: physical quantity, time series, timeline, point, signal, metric, measurement value, etc. A measurement point is a time series consisting of multiple data points arranged in ascending timestamp order. It typically represents a collection point that periodically gathers physical quantities from its environment. -### Encoding +### 1.5 Encoding Encoding is a compression technique that represents data in binary form, improving storage efficiency. IoTDB supports multiple encoding methods for different types of data. For details, refer to: [Compression and Encoding ](../Technical-Insider/Encoding-and-Compression.md)。 -### Compression +### 1.6 Compression After encoding, IoTDB applies additional compression techniques to further reduce data size and improve storage efficiency. Various compression algorithms are supported. For details, refer to: [ Compression and Encoding](../Technical-Insider/Encoding-and-Compression.md)。 -## Distributed System Related Concepts +## 2. Distributed System Related Concepts IoTDB supports distributed deployments, typically in a 3C3D cluster model (3 ConfigNodes, 3 DataNodes), as illustrated below: -### Key Concepts +### 2.1 Key Concepts - **Nodes** (*ConfigNode,* *DataNode**, AINode*) - **Regions** (*SchemaRegion, DataRegion*) @@ -67,7 +67,7 @@ IoTDB supports distributed deployments, typically in a 3C3D cluster model (3 Con Below is an introduction to these concepts. -### Nodes +### 2.2 Nodes An IoTDB cluster consists of three types of nodes, each with distinct responsibilities: @@ -75,7 +75,7 @@ An IoTDB cluster consists of three types of nodes, each with distinct responsibi - **DataNode (Storage and Computation Node)** Handles client requests, stores data, and executes computations. - **AINode (Analytics Node)** Provides machine learning capabilities, allowing users to register pre-trained models and perform inference via SQL. It includes built-in time-series models and common ML algorithms for tasks like prediction and anomaly detection. -### Data Partitioning +### 2.3 Data Partitioning IoTDB divides schema and data into **Regions**, which are managed by DataNodes. @@ -84,7 +84,7 @@ IoTDB divides schema and data into **Regions**, which are managed by DataNodes. For more details, see [Cluster Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) -### Replica Groups +### 2.4 Replica Groups Replica groups ensure high availability by maintaining multiple copies of schema and data. The recommended replication configurations are: @@ -94,11 +94,11 @@ Replica groups ensure high availability by maintaining multiple copies of schema | Data | data_replication_factor | 1 | 2 | -## Deployment Related Concepts +## 3. Deployment Related Concepts IoTDB has two operation modes: standalone mode and cluster mode. -### Standalone Mode +### 3.1 Standalone Mode An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, referred to as 1C1D. @@ -107,7 +107,7 @@ An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, referred to a - **Deployment method**:[Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) -### Cluster Mode +### 3.2 Cluster Mode An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNodes, typically 3 DataNodes, referred to as 3C3D. In the event of partial node failures, the remaining nodes can still provide services, ensuring high availability of the database service, and the database performance can be improved with the addition of nodes. @@ -115,7 +115,7 @@ An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNode - **Applicable scenarios**: Enterprise-level application scenarios that require high availability and reliability. - **Deployment method**: [Cluster Deployment](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) -### Summary of Features +### 3.3 Summary of Features | **Dimension** | **Stand-Alone Mode** | **Cluster Mode** | | :-------------------------- | :----------------------------------------------------- | :----------------------------------------------------------- | diff --git a/src/UserGuide/Master/Table/Background-knowledge/Cluster-Concept_timecho.md b/src/UserGuide/Master/Table/Background-knowledge/Cluster-Concept_timecho.md index 9229f35db..40ff6cca8 100644 --- a/src/UserGuide/Master/Table/Background-knowledge/Cluster-Concept_timecho.md +++ b/src/UserGuide/Master/Table/Background-knowledge/Cluster-Concept_timecho.md @@ -21,9 +21,9 @@ # Common Concept -## SQL Dialect Related Concepts +## 1. SQL Dialect Related Concepts -### sql_dialect +### 1.1 sql_dialect IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points: @@ -32,34 +32,34 @@ IoTDB supports two time-series data models (SQL dialects), both managing devices Each dialect comes with its own SQL syntax and query patterns tailored to its data model. -### Schema +### 1.2 Schema Schema refers to the metadata structure of the database, which can follow either a tree or table format. It includes definitions such as measurement point names, data types, and storage configurations. -### Device +### 1.3 Device A device corresponds to a physical device in a real-world scenario, typically associated with multiple measurement points. -### Timeseries +### 1.4 Timeseries Also referred to as: physical quantity, time series, timeline, point, signal, metric, measurement value, etc. A measurement point is a time series consisting of multiple data points arranged in ascending timestamp order. It typically represents a collection point that periodically gathers physical quantities from its environment. -### Encoding +### 1.5 Encoding Encoding is a compression technique that represents data in binary form, improving storage efficiency. IoTDB supports multiple encoding methods for different types of data. For details, refer to: [Compression and Encoding ](../Technical-Insider/Encoding-and-Compression.md)。 -### Compression +### 1.6 Compression After encoding, IoTDB applies additional compression techniques to further reduce data size and improve storage efficiency. Various compression algorithms are supported. For details, refer to: [ Compression and Encoding](../Technical-Insider/Encoding-and-Compression.md)。 -## Distributed System Related Concepts +## 2. Distributed System Related Concepts IoTDB supports distributed deployments, typically in a 3C3D cluster model (3 ConfigNodes, 3 DataNodes), as illustrated below: -### Key Concepts +### 2.1 Key Concepts - **Nodes** (*ConfigNode,* *DataNode**, AINode*) - **Regions** (*SchemaRegion, DataRegion*) @@ -68,7 +68,7 @@ IoTDB supports distributed deployments, typically in a 3C3D cluster model (3 Con Below is an introduction to these concepts. -### Nodes +### 2.2 Nodes An IoTDB cluster consists of three types of nodes, each with distinct responsibilities: @@ -76,7 +76,7 @@ An IoTDB cluster consists of three types of nodes, each with distinct responsibi - **DataNode (Storage and Computation Node)** Handles client requests, stores data, and executes computations. - **AINode (Analytics Node)** Provides machine learning capabilities, allowing users to register pre-trained models and perform inference via SQL. It includes built-in time-series models and common ML algorithms for tasks like prediction and anomaly detection. -### Data Partitioning +### 2.3 Data Partitioning IoTDB divides schema and data into **Regions**, which are managed by DataNodes. @@ -85,7 +85,7 @@ IoTDB divides schema and data into **Regions**, which are managed by DataNodes. For more details, see [Cluster Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) -### Replica Groups +### 2.4 Replica Groups Replica groups ensure high availability by maintaining multiple copies of schema and data. The recommended replication configurations are: @@ -95,11 +95,11 @@ Replica groups ensure high availability by maintaining multiple copies of schema | Data | data_replication_factor | 1 | 2 | -## Deployment Related Concepts +## 3. Deployment Related Concepts IoTDB has two operation modes: standalone mode and cluster mode. -### Standalone Mode +### 3.1 Standalone Mode An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D. @@ -108,7 +108,7 @@ An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D. - **Deployment Method**: [Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) -### Dual-Active Mode +### 3.2 Dual-Active Mode Dual-Active Deployment is a feature of TimechoDB, where two independent instances synchronize bidirectionally and can provide services simultaneously. If one instance stops and restarts, the other instance will resume data transfer from the breakpoint. @@ -118,7 +118,7 @@ Dual-Active Deployment is a feature of TimechoDB, where two independent instance - **Use Cases**: Scenarios with limited resources (only two servers) but requiring high availability. - **Deployment Method**: [Dual-Active Deployment](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) -### Cluster Mode +### 3.3 Cluster Mode An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNodes, typically 3 DataNodes, i.e., 3C3D. If some nodes fail, the remaining nodes can still provide services, ensuring high availability of the database. Performance can be improved by adding DataNodes. @@ -127,7 +127,7 @@ An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNode - **Deployment Method**: [Cluster Deployment](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md) -### Feature Summary +### 3.4 Feature Summary | **Dimension** | **Stand-Alone Mode** | **Dual-Active Mode** | **Cluster Mode** | | :-------------------------- | :------------------------------------------------------- | :------------------------------------------------------ | :------------------------------------------------------ | diff --git a/src/UserGuide/Master/Table/Background-knowledge/Data-Model-and-Terminology_apache.md b/src/UserGuide/Master/Table/Background-knowledge/Data-Model-and-Terminology_apache.md index 2bec26da1..f3b777bf2 100644 --- a/src/UserGuide/Master/Table/Background-knowledge/Data-Model-and-Terminology_apache.md +++ b/src/UserGuide/Master/Table/Background-knowledge/Data-Model-and-Terminology_apache.md @@ -23,11 +23,11 @@ This section introduces how to transform time series data application scenarios into IoTDB time series modeling. -## 1 Time Series Data Model +## 1. Time Series Data Model Before designing an IoTDB data model, it's essential to understand time series data and its underlying structure. For more details, refer to: [Time Series Data Model](../Background-knowledge/Navigating_Time_Series_Data.md) -## 2 Two Time Series Model in IoTDB +## 2. Two Time Series Model in IoTDB IoTDB offers two data modeling syntaxes—tree model and table model, each with its distinct characteristics as follows: @@ -80,7 +80,7 @@ The following table compares the tree model and the table model from various dim - When establishing a database connection via client tools (Cli) or SDKs, specify the model syntax using the `sql_dialect` parameter (Tree syntax is used by default). -## 3 Application Scenarios +## 3. Application Scenarios The application scenarios mainly include two categories: diff --git a/src/UserGuide/Master/Table/Background-knowledge/Data-Model-and-Terminology_timecho.md b/src/UserGuide/Master/Table/Background-knowledge/Data-Model-and-Terminology_timecho.md index 0e843c871..477666573 100644 --- a/src/UserGuide/Master/Table/Background-knowledge/Data-Model-and-Terminology_timecho.md +++ b/src/UserGuide/Master/Table/Background-knowledge/Data-Model-and-Terminology_timecho.md @@ -23,11 +23,11 @@ This section introduces how to transform time series data application scenarios into IoTDB time series modeling. -## 1 Time Series Data Model +## 1. Time Series Data Model Before designing an IoTDB data model, it's essential to understand time series data and its underlying structure. For more details, refer to: [Time Series Data Model](../Background-knowledge/Navigating_Time_Series_Data.md) -## 2 Two Time Series Model in IoTDB +## 2. Two Time Series Model in IoTDB IoTDB offers two data modeling syntaxes—tree model and table model, each with its distinct characteristics as follows: @@ -80,7 +80,7 @@ The following table compares the tree model and the table model from various dim - When establishing a database connection via client tools (Cli) or SDKs, specify the model syntax using the `sql_dialect` parameter (Tree syntax is used by default). -## 3 Application Scenarios +## 3. Application Scenarios The application scenarios mainly include three categories: diff --git a/src/UserGuide/Master/Table/Background-knowledge/Data-Type.md b/src/UserGuide/Master/Table/Background-knowledge/Data-Type.md index 179caa45d..34219dad3 100644 --- a/src/UserGuide/Master/Table/Background-knowledge/Data-Type.md +++ b/src/UserGuide/Master/Table/Background-knowledge/Data-Type.md @@ -21,7 +21,7 @@ # Data Types -## 1 Basic Data Types +## 1. Basic Data Types IoTDB supports the following ten data types: @@ -75,7 +75,7 @@ The compatibility of data types is shown in the table below: | TIMESTAMP | INT32, INT64, TIMESTAMP | | DATE | DATE | -## 2 Timestamp Types +## 2. Timestamp Types A timestamp represents the moment when data is recorded. IoTDB supports two types: diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Cluster-Deployment_apache.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Cluster-Deployment_apache.md index 91f8fdc61..2a8d7c6cf 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Cluster-Deployment_apache.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Cluster-Deployment_apache.md @@ -27,7 +27,7 @@ This guide describes how to manually deploy a cluster instance consisting of 3 C -## 1 Prerequisites +## 1. Prerequisites 1. **System Preparation**: Ensure the system has been configured according to the [System Requirements](../Deployment-and-Maintenance/Environment-Requirements.md). @@ -51,14 +51,14 @@ Use the hostname for `cn_internal_address` and `dn_internal_address` in IoTDB co 6. **Monitoring Panel**: Deploy a monitoring panel to track key performance metrics. Contact the Timecho team for access and refer to the [Monitoring Board Install and Deploy](../Deployment-and-Maintenance/Monitoring-panel-deployment.md). -## 2 Preparation +## 2. Preparation 1. Prepare the IoTDB database installation package::apache-iotdb-{version}-all-bin.zip(Please refer to the installation package for details:[IoTDB-Package](../Deployment-and-Maintenance/IoTDB-Package_apache.md)) 2. Configure the operating system environment according to environmental requirements (system environment configuration can be found in:[Environment Requirement](../Deployment-and-Maintenance/Environment-Requirements.md)) -## 3 Installation Steps +## 3. Installation Steps Taking a cluster with three Linux servers with the following information as example: @@ -161,7 +161,7 @@ On each server, navigate to the `sbin` directory and start the DataNode: Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database has been successfully activated. -## 4 Maintenance +## 4. Maintenance ### 4.1 ConfigNode Maintenance @@ -188,7 +188,7 @@ sbin/start-confignode.bat #### 4.1.2 Removing a ConfigNode -1. Connect to the cluster using the CLI and confirm the NodeID of the ConfigNode to be removed: +1. Connect to the cluster using the CLI and confirm the internal address and port of the ConfigNode to be removed: ```Plain show confignodes; @@ -209,10 +209,22 @@ Total line number = 3 It costs 0.030s ``` -2. Remove the ConfigNode using the SQL: +2. Remove the ConfigNode using the script: + +**Linux / MacOS:** + +```Bash +sbin/remove-confignode.sh [confignode_id] +# Or: +sbin/remove-confignode.sh [cn_internal_address:cn_internal_port] +``` + +**Windows:** ```Bash -remove confignode [confignode_id] +sbin/remove-confignode.bat [confignode_id] +# Or: +sbin/remove-confignode.bat [cn_internal_address:cn_internal_port] ``` ### 4.2 DataNode Maintenance @@ -242,7 +254,7 @@ sbin/start-datanode.bat #### 4.2.2 Removing a DataNode -1. Connect to the cluster using the CLI and confirm the NodeID of the DataNode to be removed: +1. Connect to the cluster using the CLI and confirm the RPC address and port of the DataNode to be removed: ```Plain show datanodes; @@ -263,13 +275,21 @@ Total line number = 3 It costs 0.110s ``` -2. Remove the DataNode using the SQL: +2. Remove the DataNode using the script: + +**Linux / MacOS:** + +```Bash +sbin/remove-datanode.sh [dn_rpc_address:dn_rpc_port] +``` + +**Windows:** ```Bash -remove datanode [datanode_id] +sbin/remove-datanode.bat [dn_rpc_address:dn_rpc_port] ``` -## 5 Common Issues +## 5. Common Issues 1. ConfigNode Fails to Start 1. Review the startup logs to check if any parameters, which cannot be modified after the first startup, were changed. @@ -304,7 +324,7 @@ remove datanode [datanode_id] rm -rf data logs ``` -## 6 Appendix +## 6. Appendix ### 6.1 ConfigNode Parameters diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Cluster-Deployment_timecho.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Cluster-Deployment_timecho.md index eacee8364..f039b0fca 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Cluster-Deployment_timecho.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Cluster-Deployment_timecho.md @@ -27,7 +27,7 @@ This guide describes how to manually deploy a cluster instance consisting of 3 C -## 1 Prerequisites +## 1. Prerequisites 1. **System Preparation**: Ensure the system has been configured according to the [System Requirements](../Deployment-and-Maintenance/Environment-Requirements.md). @@ -51,13 +51,13 @@ Use the hostname for `cn_internal_address` and `dn_internal_address` in IoTDB co 6. **Monitoring Panel**: Deploy a monitoring panel to track key performance metrics. Contact the Timecho team for access and refer to the [Monitoring Board Install and Deploy](../Deployment-and-Maintenance/Monitoring-panel-deployment.md). -## 2 Preparation +## 2. Preparation 1. Obtain the TimechoDB installation package: `timechodb-{version}-bin.zip` following [IoTDB-Package](../Deployment-and-Maintenance/IoTDB-Package_timecho.md)) 2. Configure the operating system environment according to [Environment Requirement](../Deployment-and-Maintenance/Environment-Requirements.md)) -## 3 Installation Steps +## 3. Installation Steps Taking a cluster with three Linux servers with the following information as example: @@ -217,7 +217,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database ![](/img/%E9%9B%86%E7%BE%A4-%E9%AA%8C%E8%AF%81.png) -## 4 Maintenance +## 4. Maintenance ### 4.1 ConfigNode Maintenance @@ -244,7 +244,7 @@ sbin/start-confignode.bat #### 4.1.2 Removing a ConfigNode -1. Connect to the cluster using the CLI and confirm the NodeID of the ConfigNode to be removed: +1. Connect to the cluster using the CLI and confirm the internal address and port of the ConfigNode to be removed: ```Plain show confignodes; @@ -265,11 +265,22 @@ Total line number = 3 It costs 0.030s ``` -2. Remove the ConfigNode using the SQL: +2. Remove the ConfigNode using the script: +**Linux / MacOS:** ```Bash -remove confignode [confignode_id] +sbin/remove-confignode.sh [confignode_id] +# Or: +sbin/remove-confignode.sh [cn_internal_address:cn_internal_port] +``` + +**Windows:** + +```Bash +sbin/remove-confignode.bat [confignode_id] +# Or: +sbin/remove-confignode.bat [cn_internal_address:cn_internal_port] ``` ### 4.2 DataNode Maintenance @@ -299,7 +310,7 @@ sbin/start-datanode.bat #### 4.2.2 Removing a DataNode -1. Connect to the cluster using the CLI and confirm the NodeID of the DataNode to be removed: +1. Connect to the cluster using the CLI and confirm the RPC address and port of the DataNode to be removed: ```Plain show datanodes; @@ -320,13 +331,21 @@ Total line number = 3 It costs 0.110s ``` -2. Remove the DataNode using the SQL: +2. Remove the DataNode using the script: + +**Linux / MacOS:** + +```Bash +sbin/remove-datanode.sh [dn_rpc_address:dn_rpc_port] +``` + +**Windows:** ```Bash -remove datanode [datanode_id] +sbin/remove-datanode.bat [dn_rpc_address:dn_rpc_port] ``` -## 5 Common Issues +## 5. Common Issues 1. Activation Fails Repeatedly - Use the `ls -al` command to verify that the ownership of the installation directory matches the current user. @@ -365,7 +384,7 @@ remove datanode [datanode_id] rm -rf data logs ``` -## 6 Appendix +## 6. Appendix ### 6.1 ConfigNode Parameters diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Database-Resources.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Database-Resources.md index 2ca497e6e..0d0f3a851 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Database-Resources.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Database-Resources.md @@ -19,7 +19,7 @@ --> # Database Resources -## 1 CPU +## 1. CPU @@ -81,7 +81,7 @@
-## 2 Memory +## 2. Memory @@ -143,7 +143,7 @@
-## 3 Storage (Disk) +## 3. Storage (Disk) ### 3.1 Storage space Calculation Formula: @@ -203,7 +203,7 @@ Example: - For systems with > 10 million measurement points or high query loads, SSD is recommended. -## 4 Network (NIC) +## 4. Network (NIC) When the write throughput does not exceed 10 million points per second, a gigabit network card is required. When the write throughput exceeds 10 million points per second, a 10-gigabit network card is required. | **Write** **Throughput** **(Data Points/Second)** | **NIC** **Speed** | @@ -211,6 +211,6 @@ When the write throughput does not exceed 10 million points per second, a gigabi | < 10 million | 1 Gbps (Gigabit) | | ≥ 10 million | 10 Gbps (10 Gigabit) | -## 5 Additional Notes +## 5. Additional Notes - IoTDB supports second-level cluster scaling . Data migration is not required when adding new nodes, so there is no need to worry about limited cluster capacity based on current data estimates. You can add new nodes to the cluster when scaling is needed in the future. \ No newline at end of file diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Deployment-form_apache.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Deployment-form_apache.md index a934884cb..eec5edf92 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Deployment-form_apache.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Deployment-form_apache.md @@ -22,7 +22,7 @@ IoTDB has two operation modes: standalone mode and cluster mode. -## 1 Standalone Mode +## 1. Standalone Mode An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, referred to as 1C1D. @@ -31,7 +31,7 @@ An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, referred to a - **Deployment method**:[Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) -## 2 Cluster Mode +## 2. Cluster Mode An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNodes, typically 3 DataNodes, referred to as 3C3D. In the event of partial node failures, the remaining nodes can still provide services, ensuring high availability of the database service, and the database performance can be improved with the addition of nodes. @@ -39,7 +39,7 @@ An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNode - **Applicable scenarios**: Enterprise-level application scenarios that require high availability and reliability. - **Deployment method**: [Cluster Deployment](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) -## 3 Summary of Features +## 3. Summary of Features | **Dimension** | **Stand-Alone Mode** | **Cluster Mode** | | :-------------------------- | :----------------------------------------------------- | :----------------------------------------------------------- | diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Deployment-form_timecho.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Deployment-form_timecho.md index c757e9561..b2daee47f 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Deployment-form_timecho.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Deployment-form_timecho.md @@ -22,7 +22,7 @@ IoTDB has two operation modes: standalone mode and cluster mode. -## 1 Standalone Mode +## 1. Standalone Mode An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D. @@ -30,7 +30,7 @@ An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D. - **Use Cases**: Scenarios with limited resources or low high-availability requirements, such as edge servers. - **Deployment Method**: [Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) -## 2 Dual-Active Mode +## 2. Dual-Active Mode Dual-Active Deployment is a feature of TimechoDB, where two independent instances synchronize bidirectionally and can provide services simultaneously. If one instance stops and restarts, the other instance will resume data transfer from the breakpoint. @@ -40,7 +40,7 @@ Dual-Active Deployment is a feature of TimechoDB, where two independent instance - **Use Cases**: Scenarios with limited resources (only two servers) but requiring high availability. - **Deployment Method**: [Dual-Active Deployment](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) -## 3 Cluster Mode +## 3. Cluster Mode An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNodes, typically 3 DataNodes, i.e., 3C3D. If some nodes fail, the remaining nodes can still provide services, ensuring high availability of the database. Performance can be improved by adding DataNodes. @@ -50,7 +50,7 @@ An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNode -## 4 Feature Summary +## 4. Feature Summary | **Dimension** | **Stand-Alone Mode** | **Dual-Active Mode** | **Cluster Mode** | | :-------------------------- | :------------------------------------------------------- | :------------------------------------------------------ | :------------------------------------------------------ | diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Docker-Deployment_apache.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Docker-Deployment_apache.md index 176db37f8..38c3feb95 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Docker-Deployment_apache.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Docker-Deployment_apache.md @@ -20,7 +20,7 @@ --> # Docker Deployment -## 1 Environment Preparation +## 1. Environment Preparation ### 1.1 Install Docker @@ -53,12 +53,12 @@ ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose docker-compose --version #Display version information, indicating successful installation. ``` -## 2 Stand-Alone Deployment +## 2. Stand-Alone Deployment This section demonstrates how to deploy a standalone Docker version of 1C1D. -### Pull Image File +### 2.1 Pull Image File The Docker image of Apache IoTDB has been uploaded tohttps://hub.docker.com/r/apache/iotdb。 @@ -201,7 +201,7 @@ docker cp iotdb:/iotdb/conf /docker-iotdb/iotdb/conf docker-compose -f docker-compose-standalone.yml up -d ``` -## 3 Cluster Deployment +## 3. Cluster Deployment This section describes how to manually deploy a cluster consisting of 3 ConfigNodes and 3 DataNodes, commonly referred to as a 3C3D cluster. diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Docker-Deployment_timecho.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Docker-Deployment_timecho.md index 608bc363c..858098632 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Docker-Deployment_timecho.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Docker-Deployment_timecho.md @@ -20,7 +20,7 @@ --> # Docker Deployment -## 1 Environment Preparation +## 1. Environment Preparation ### 1.1 Install Docker @@ -67,7 +67,7 @@ After installing `dmidecode`, you can locate its installation path by running:`w For the TimechoDB container image, you can contact the Timecho team to acquire it. -## 2 Stand-Alone Deployment +## 2. Stand-Alone Deployment This section demonstrates how to deploy a standalone Docker version of 1C1D. @@ -233,7 +233,7 @@ docker cp iotdb:/iotdb/conf /docker-iotdb/iotdb/conf docker-compose -f docker-compose-standalone.yml up -d ``` -## 3 Cluster Deployment +## 3. Cluster Deployment This section describes how to manually deploy a cluster consisting of 3 ConfigNodes and 3 DataNodes, commonly referred to as a 3C3D cluster. diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md index e6cb33081..cf1dee5d8 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md @@ -20,7 +20,7 @@ --> # Dual Active Deployment -## What is a double active version? +## 1. What is a double active version? Dual-active mode refers to two independent instances (either standalone or clusters) with completely independent configurations. These instances can simultaneously handle external read and write operations, with real-time bi-directional synchronization and breakpoint recovery capabilities. @@ -33,7 +33,7 @@ Key features include: ![](/img/20240731104336.png) -## Prerequisites +## 2. Prerequisites 1. **Hostname Configuration**: It is recommended to prioritize hostname over IP during deployment to avoid issues where the database cannot start due to later changes in the host IP. For instance, if the local IP is `192.168.1.3` and the hostname is `iotdb-1`, configure it in `/etc/hosts` using: @@ -47,7 +47,7 @@ Use the hostname to configure IoTDB’s `cn_internal_address` and `dn_internal_a 3. **Monitoring Panel**: Deploying a monitoring panel is recommended to monitor key performance indicators and stay informed about the database’s operational status. Contact the Timecho team to obtain the monitoring panel and refer to the corresponding [Monitoring Panel Deployment](../Deployment-and-Maintenance/Monitoring-panel-deployment.md) for deployment steps. -## 3 Installation Steps +## 3. Installation Steps This guide uses two standalone nodes, A and B, to deploy the dual-active version of TimechoDB. The IP addresses and hostnames for the nodes are as follows: @@ -56,13 +56,13 @@ This guide uses two standalone nodes, A and B, to deploy the dual-active version | A | 192.168.1.3 | iotdb-1 | | B | 192.168.1.4 | iotdb-2 | -### Step1:Install Two Independent TimechoDB Instances +### 3.1 Install Two Independent TimechoDB Instances Install TimechoDB on both machines (A and B) independently. For detailed instructions, refer to the standalone [Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md)or cluster [Cluster Deployment](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md)deployment guides. Ensure that configurations for A and B are consistent for optimal dual-active performance. -### Step2:Configure Data Synchronization from Machine A to Machine B +### 3.2 Configure Data Synchronization from Machine A to Machine B - Connect to the database on Machine A using the CLI tool from the `sbin` directory: @@ -85,7 +85,7 @@ with sink ( - **Note:** To avoid infinite data loops, ensure the parameter `source.mode.double-living` is set to `true` on both A and B. This prevents retransmission of data received through the other instance's pipe. -### Step3:Configure Data Synchronization from Machine B to Machine A +### 3.3 Configure Data Synchronization from Machine B to Machine A - Connect to the database on Machine B: @@ -109,7 +109,7 @@ with sink ( - **Note:** To avoid infinite data loops, ensure the parameter `source.mode.double-living` is set to `true` on both A and B. This prevents retransmission of data received through the other instance's pipe. -### Step4:Verify Deployment +### 3.4 Verify Deployment #### Check Cluster Status @@ -147,7 +147,7 @@ On machine B: ![](/img/show%20pipes-B.png) -### Step5:Stop the Dual-Active Instances +### 3.5 Stop the Dual-Active Instances To stop the dual-active instances: diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Environment-Requirements.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Environment-Requirements.md index a1a168b86..dd2f1e26a 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Environment-Requirements.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Environment-Requirements.md @@ -20,7 +20,7 @@ --> # System Requirements -## 1 Disk Array +## 1. Disk Array ### 1.1 Configuration Suggestions @@ -76,7 +76,7 @@ IoTDB does not have strict operational requirements for disk array configuration | Data Disk | RAID5 | 7 | 1 disk failure allowed | 6 | | Data Disk | No RAID | 1 | Data loss if damaged | 1 | -## 2 Operating System +## 2. Operating System ### 2.1 Version Requirements @@ -184,7 +184,7 @@ Recommended disk partitioning is as follows: -## 3 Software Dependencies +## 3. Software Dependencies Install Java Runtime Environment, Java version >= 1.8. Ensure JDK environment variables are set. (For versions V1.3.2.2 and later, it is recommended to directly deploy JDK17. Older JDK versions may have performance issues in some scenarios, and DataNode may fail to stop.) diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/IoTDB-Package_apache.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/IoTDB-Package_apache.md index 4bf9b1e0f..e775c431f 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/IoTDB-Package_apache.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/IoTDB-Package_apache.md @@ -20,12 +20,12 @@ --> # Obtain IoTDB -## 1 How to obtain IoTDB +## 1. How to obtain IoTDB The installation package can be directly obtained from the Apache IoTDB official website:https://iotdb.apache.org/Download/ -## 2 Installation Package Structure +## 2. Installation Package Structure Install the package after decompression(`apache-iotdb--all-bin.zip`),After decompressing the installation package, the directory structure is as follows: diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/IoTDB-Package_timecho.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/IoTDB-Package_timecho.md index 261c8a10f..3c1742408 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/IoTDB-Package_timecho.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/IoTDB-Package_timecho.md @@ -20,11 +20,11 @@ --> # Obtain TimechoDB -## 1 How to obtain TimechoDB +## 1. How to obtain TimechoDB The TimechoDB installation package can be obtained through product trial application or by directly contacting the Timecho team. -## 2 Installation Package Structure +## 2. Installation Package Structure After unpacking the installation package(`iotdb-enterprise-{version}-bin.zip`),you will see the directory structure is as follows: diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Monitoring-panel-deployment.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Monitoring-panel-deployment.md index 9bd72b9fc..8cabc7278 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Monitoring-panel-deployment.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Monitoring-panel-deployment.md @@ -22,20 +22,15 @@ The monitoring panel is one of the supporting tools for TimechoDB. It aims to solve the monitoring problems of TimechoDB and its operating system, mainly including operating system resource monitoring, TimechoDB performance monitoring, and hundreds of kernel monitoring metrics, in order to help users monitor cluster health, optimize performance, and perform maintenance. This guide demonstrates how to enable the system monitoring module in a TimechoDB instance and visualize monitoring metrics using Prometheus + Grafana, using a typical 3C3D cluster (3 ConfigNodes and 3 DataNodes) as an example. -## Installation Preparation - -1. Installing IoTDB: You need to first install IoTDB V1.0 or above Enterprise Edition. You can contact business or technical support to obtain -2. Obtain the IoTDB monitoring panel installation package: Based on the enterprise version of IoTDB database monitoring panel, you can contact business or technical support to obtain - -## 1 Installation Preparation +## 1. Installation Preparation 1. Installing TimechoDB: Install TimechoDB V1.0 or above. Contact sales or technical support to obtain the installation package. 2. Obtain the monitoring panel installation package: The monitoring panel is exclusive to the enterprise-grade TimechoDB. Contact sales or technical support to obtain it. -## 2 Installation Steps +## 2. Installation Steps -### Step 1: Enable Monitoring Metrics Collection in TimechoDB +### 2.1 Enable Monitoring Metrics Collection in TimechoDB 1. Enable related configuration options. The configuration options related to monitoring in TimechoDB are disabled by default. Before deploying the monitoring panel, you need to enable certain configuration options (note that the service needs to be restarted after enabling monitoring configuration). @@ -71,7 +66,7 @@ Taking the 3C3D cluster as an example, the monitoring configuration that needs t ![](/img/%E5%90%AF%E5%8A%A8.png) -### Step 2: Install and Configure Prometheus +### 2.2 Install and Configure Prometheus > In this example, Prometheus is installed on server 192.168.1.3. @@ -122,7 +117,7 @@ scrape_configs: ![](/img/%E8%8A%82%E7%82%B9%E7%9B%91%E6%8E%A7.png) -### Step 3: Install Grafana and Configure the Data Source +### 2.3 Install Grafana and Configure the Data Source > n this example, Grafana is installed on server 192.168.1.3. @@ -151,7 +146,7 @@ Ensure the URL for Prometheus is correct. Click "Save & Test". If the message "D ![](/img/%E9%85%8D%E7%BD%AE%E6%88%90%E5%8A%9F.png) -### Step 4: Import IoTDB Grafana Dashboards +### 2.4 Import IoTDB Grafana Dashboards 1. Enter Grafana and select Dashboards: @@ -189,7 +184,7 @@ Ensure the URL for Prometheus is correct. Click "Save & Test". If the message "D ![](/img/%E9%9D%A2%E6%9D%BF%E6%B1%87%E6%80%BB.png) -## 3 Appendix, Detailed Monitoring Metrics +## 3. Appendix, Detailed Monitoring Metrics ### 3.1 System Dashboard diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md index a5dd070ba..fe3c3eb52 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md @@ -22,7 +22,7 @@ This guide introduces how to set up a standalone TimechoDB instance, which includes one ConfigNode and one DataNode (commonly referred to as 1C1D). -## 1 Prerequisites +## 1. Prerequisites 1. **System Preparation**: Ensure the system has been configured according to the [System Requirements](../Deployment-and-Maintenance/Environment-Requirements.md). @@ -46,7 +46,7 @@ Use the hostname for `cn_internal_address` and `dn_internal_address` in IoTDB co 6. **Monitoring Panel**: Deploy a monitoring panel to track key performance metrics. Contact the Timecho team for access and refer to the [Monitoring Board Install and Deploy](../Deployment-and-Maintenance/Monitoring-panel-deployment.md). -## 2 Installation Steps +## 2. Installation Steps ### 2.1 Extract Installation Package @@ -131,7 +131,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database ![](/img/%E5%8D%95%E6%9C%BA-%E9%AA%8C%E8%AF%81.png) -## 3 Common Issues +## 3. Common Issues 1. ConfigNode Fails to Start @@ -167,7 +167,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database rm -rf data logs ``` -## 4 Appendix +## 4. Appendix ### 4.1 ConfigNode Parameters diff --git a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md index 86c70ce67..96ebbbdeb 100644 --- a/src/UserGuide/Master/Table/Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md +++ b/src/UserGuide/Master/Table/Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md @@ -22,7 +22,7 @@ This guide introduces how to set up a standalone TimechoDB instance, which includes one ConfigNode and one DataNode (commonly referred to as 1C1D). -## 1 Prerequisites +## 1. Prerequisites 1. **System Preparation**: Ensure the system has been configured according to the [System Requirements](../Deployment-and-Maintenance/Environment-Requirements.md). @@ -46,7 +46,7 @@ Use the hostname for `cn_internal_address` and `dn_internal_address` in IoTDB co 6. **Monitoring Panel**: Deploy a monitoring panel to track key performance metrics. Contact the Timecho team for access and refer to the [Monitoring Board Install and Deploy](../Deployment-and-Maintenance/Monitoring-panel-deployment.md). -## 2 Installation Steps +## 2. Installation Steps ### 2.1 Extract Installation Package @@ -185,7 +185,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database ![](/img/%E5%8D%95%E6%9C%BA-%E9%AA%8C%E8%AF%81.png) -## 3 Common Issues +## 3. Common Issues 1. Activation Fails Repeatedly 1. Use the `ls -al` command to verify that the ownership of the installation directory matches the current user. @@ -225,7 +225,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database rm -rf data logs ``` -## 4 Appendix +## 4. Appendix ### 4.1 ConfigNode Parameters diff --git a/src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduce_apache.md b/src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduction_apache.md similarity index 98% rename from src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduce_apache.md rename to src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduction_apache.md index 21bdfbeba..d94979310 100644 --- a/src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduce_apache.md +++ b/src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduction_apache.md @@ -28,7 +28,7 @@ Apache IoTDB is a low-cost, high-performance IoT-native time-series database. It - Installation, Deployment, and Usage Documentation: [Quick Start](../QuickStart/QuickStart_apache.md) -## Product Ecosystem +## 1. Product Ecosystem The IoTDB ecosystem consists of multiple components designed to efficiently manage and analyze massive IoT-generated time-series data. @@ -44,14 +44,14 @@ Key components include: 3. **Time-Series Model Training-Inference Engine (IoTDB AINode)**: A unified engine for intelligent analysis, supporting model training, data management, and integration with machine/deep learning frameworks. -## TimechoDB Architecture +## 2. TimechoDB Architecture The diagram below illustrates a typical IoTDB cluster deployment (3 ConfigNodes and 3 DataNodes): -## Key Features +## 3. Key Features Apache IoTDB offers the following advantages: @@ -92,7 +92,7 @@ Apache IoTDB offers the following advantages: - Hadoop, Spark, Grafana, ThingsBoard, DataEase, etc. -## TimechoDB +## 4. TimechoDB Timecho Technology has developed **TimechoDB**, a commercial product built on the open-source version of Apache IoTDB, to provide enterprise-grade solutions and services for businesses and commercial clients. TimechoDB addresses the multifaceted challenges enterprises face when building IoT big data platforms for managing time-series data, including complex application scenarios, massive data volumes, high sampling frequencies, frequent out-of-order data, time-consuming data processing, diverse analytical requirements, and high storage and maintenance costs. diff --git a/src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduce_timecho.md b/src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduction_timecho.md similarity index 97% rename from src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduce_timecho.md rename to src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduction_timecho.md index 0113ec4b5..60c0cbf44 100644 --- a/src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduce_timecho.md +++ b/src/UserGuide/Master/Table/IoTDB-Introduction/IoTDB-Introduction_timecho.md @@ -18,6 +18,7 @@ under the License. --> +# Product Introduction TimechoDB is a high-performance, cost-efficient, and IoT-native time-series database developed by Timecho. As an enterprise-grade extension of Apache IoTDB, it is designed to tackle the complexities of managing large-scale time-series data in IoT environments. These challenges include high-frequency data sampling, massive data volumes, out-of-order data, extended processing times, diverse analytical demands, and high storage and maintenance costs. @@ -25,7 +26,7 @@ TimechoDB enhances Apache IoTDB with superior functionality, optimized performan - [Quick Start](../QuickStart/QuickStart_timecho.md): Download, Deploy, and Use -## TimechoDB Data Management Solution +## 1. TimechoDB Data Management Solution The Timecho ecosystem provides an integrated **collect-store-use** solution, covering the complete lifecycle of time-series data, from acquisition to analysis. @@ -48,13 +49,13 @@ Key components include: 1. Supports **various industrial protocols, resumable transfers, and network barrier penetration**. 2. Facilitates **reliable data acquisition in challenging industrial environments**. -## TimechoDB Architecture +## 2. TimechoDB Architecture The diagram below illustrates a common cluster deployment (3 ConfigNodes, 3 DataNodes) of TimechoDB: ![](/img/Cluster-Concept03.png) -### Key Features +## 3. Key Features TimechoDB offers the following advantages: @@ -100,7 +101,7 @@ TimechoDB offers the following advantages: - Seamlessly integrates with big data frameworks (Hadoop, Spark) and visualization tools (Grafana, ThingsBoard, DataEase). - Supports device management for industrial IoT environments. -### Enterprise-level Enhancements +## 4. Enterprise-level Enhancements TimechoDB extends the open-source version with advanced industrial-grade capabilities, including tiered storage, cloud-edge collaboration, visualization tools, and security upgrades. @@ -258,11 +259,11 @@ TimechoDB extends the open-source version with advanced industrial-grade capabil -#### Higher Efficiency and Stability +### 4.1 Higher Efficiency and Stability TimechoDB achieves up to 10x performance improvements over Apache IoTDB in mission-critical workloads, and provides rapid fault recovery for industrial environments. -#### Comprehensive Management Tools +### 4.2 Comprehensive Management Tools TimechoDB simplifies deployment, monitoring, and maintenance through an intuitive toolset: @@ -281,7 +282,7 @@ TimechoDB simplifies deployment, monitoring, and maintenance through an intuitiv - **Cluster Management Tool** **:** - Provides **one-click operations** for cluster deployment, scaling, start/stop, and configuration updates. -#### Professional Enterprise Technical Services +### 4.3 Professional Enterprise Technical Services TimechoDB offers **vendor-backed enterprise services** to support industrial-scale deployments: @@ -292,6 +293,6 @@ TimechoDB offers **vendor-backed enterprise services** to support industrial-sca Compared to the open-source version’s 2-3 month release cycle, TimechoDB delivers faster updates and same-day critical issue resolutions, ensuring production stability. -#### Ecosystem Compatibility & Compliance +### 4.4 Ecosystem Compatibility & Compliance imechoDB is self-developed, supports mainstream CPUs & operating systems, and meets industry compliance standards, making it a reliable choice for enterprise IoT deployments. \ No newline at end of file diff --git a/src/UserGuide/Master/Table/IoTDB-Introduction/Release-history_timecho.md b/src/UserGuide/Master/Table/IoTDB-Introduction/Release-history_timecho.md index 9cf91d467..3789b1873 100644 --- a/src/UserGuide/Master/Table/IoTDB-Introduction/Release-history_timecho.md +++ b/src/UserGuide/Master/Table/IoTDB-Introduction/Release-history_timecho.md @@ -18,10 +18,11 @@ under the License. --> +# Release History -### TimechoDB (Database Core) +## 1. TimechoDB (Database Core) -#### **V1.3.4.1** +### **V1.3.4.1** > **Release Date**: January 8, 2025 > @@ -39,7 +40,7 @@ Version V1.3.4.1 introduces a pattern-matching function and further optimizes th - `import-data`/`export-data` scripts now support new data types (strings, large binary objects, dates, timestamps). - Unified import/export compatibility for TsFile, CSV, and SQL formats. -#### **V1.3.3.3** +### **V1.3.3.3** > **Release Date**: October 31, 2024 > @@ -60,7 +61,7 @@ Version V1.3.3.3 adds the following features: optimization of restart and recove - Added Kubernetes Helm support. - Python client now supports new data types (strings, large binary objects, dates, timestamps). -#### **V1.3.3.2** +### **V1.3.3.2** > **Release Date**: August 15, 2024 > @@ -76,7 +77,7 @@ Version V1.3.3.2 supports outputting the time consumption of reading `mods `file - **Data Synchronization**: RPC compression now supports configurable levels. - **Scripts & Tools**: Metadata export excludes only `root.__system`, not similar prefixes. -#### **V1.3.3.1** +### **V1.3.3.1** > **Release Date**: July 12, 2024 > @@ -93,7 +94,7 @@ In version V1.3.3.1, a throttling mechanism is added to multi-tier storage. Data - Improved filter performance for aggregation and WHERE clauses. - Java Session client distributes SQL query requests evenly to all nodes. -#### **V1.3.2.2** +### **V1.3.2.2** > **Release Date**: June 4, 2024 > @@ -133,7 +134,7 @@ The V1.3.2.2 version introduces the Explain Analyze statement for analyzing the - Introduced `export-data/import-data` scripts to support data export in `CSV`, `TsFile `, or as `SQL `statements. - The Windows environment now supports distinguishing `ConfigNode`, `DataNode`, and `Cli `by window name. -#### **V1.3.1.4** +### **V1.3.1.4** > **Release Date**: April 23, 2024 > @@ -163,7 +164,7 @@ The V1.3.1 release introduces several new features and enhancements, including t - Added one-click scripts to start and stop the cluster (`start-all/stop-all.sh & start-all/stop-all.bat`). - Added one-click scripts to collect instance information (`collect-info.sh & collect-info.bat`). -#### **V1.3.0.4** +### **V1.3.0.4** > **Release Date**: January 3, 2024 > @@ -192,7 +193,7 @@ The V1.3.0.4 release introduces a new inborn machine learning framework `AINode` - Non-writable view sequences now support `LAST` queries. - Optimized the accuracy of data point monitoring statistics. -#### **V1.2.0.1** +### **V1.2.0.1** > **Release Date**: June 30, 2023 > @@ -225,7 +226,7 @@ The V1.2.0.1 release introduces several new features, including a new stream pro - Python client now supports write redirection. - Session API added an interface for creating sequences in batches using templates. -#### **V1.1.0.1** +### **V1.1.0.1** > **Release Date**: April 3, 2023 > @@ -253,7 +254,7 @@ The V1.1.0.1 release introduces several new features, including support for `GRO - Aggregation queries now support `GROUP BY CONDITION`. - Added support for modifying `dn_rpc_port` and `dn_rpc_address`. -#### **V1.0.0.1** +### **V1.0.0.1** > **Release Date**: December 3, 2022 > @@ -282,7 +283,7 @@ The V1.0.0.1 release focuses on fixing issues related to partition computation a - Added support for the stream processing framework. - Added support for data synchronization between clusters. -### Workbench (Console Tool) +## 2. Workbench (Console Tool) | Version | Key New Features | Supported IoTDB Versions | | :------ | :--------------------------------------- | :----------------------- | diff --git a/src/UserGuide/Master/Table/IoTDB-Introduction/Scenario.md b/src/UserGuide/Master/Table/IoTDB-Introduction/Scenario.md index 6709c7009..2ecb64c77 100644 --- a/src/UserGuide/Master/Table/IoTDB-Introduction/Scenario.md +++ b/src/UserGuide/Master/Table/IoTDB-Introduction/Scenario.md @@ -18,62 +18,63 @@ under the License. --> +# Scenario -## Scenario 1: Energy & Power +## 1. Energy & Power -#### **Background** +### 1.1 **Background** By collecting, storing, and analyzing massive time-series data from power generation, transmission, storage, and consumption processes—combined with real-time monitoring, accurate forecasting, and intelligent scheduling of power systems—enterprises can significantly improve energy efficiency, reduce operational costs, ensure the safety and sustainability of energy production, and maintain the stable operation of power grids. -#### **Architecture** +### 1.2 **Architecture** IoTDB provides a self-hosted time-series database solution with high availability, efficient data synchronization across networks, and optimized performance for large-scale data ingestion and querying. It enables power enterprises to handle large-scale time-series data efficiently, supporting real-time anomaly detection, forecasting models, and intelligent scheduling for both traditional and renewable energy sources. ![](/img/scenario-energy-en.png) -## Scenario 2: Aerospace +## 2. Aerospace -#### **Background** +### 2.1 **Background** With the rapid evolution of aerospace technology, digital transformation has become essential to improving flight safety and system performance. The aerospace industry generates vast amounts of time-series data throughout the lifecycle of aircraft, rockets, and satellites—from design and manufacturing to testing and operation. Managing and analyzing telemetry data in real time is critical for mission reliability, system optimization, and failure prevention. -#### **Architecture** +### 2.2 **Architecture** IoTDB’s high-performance time-series data processing capabilities enable real-time telemetry analysis, low-bandwidth data synchronization, and seamless offline data migration. Its flexible deployment and resource-efficient architecture provide a reliable foundation for aerospace enterprises, facilitating intelligent monitoring, rapid fault diagnosis, and continuous optimization of critical systems. ![](/img/scenario-aerospace-en.png) -## Scenario 3: Transportation +## 3. Transportation -#### **Background** +### 3.1 **Background** The rapid growth of the transportation industry has heightened demand for diversified data management, particularly in critical hubs like railways and subways, where real-time, reliable, and precise data is essential. By leveraging multi-dimensional operational, condition, and geospatial data from trains, subways, ships, and vehicles, enterprises can enable intelligent scheduling, fault prediction, route optimization, and efficient maintenance. These capabilities not only improve operational efficiency but also reduce management costs. -#### **Architecture** +### 3.2 **Architecture** IoTDB’s high-throughput time-series database supports low-latency queries, high concurrency, and efficient processing of multi-source heterogeneous data. It provides a scalable foundation for intelligent transportation systems, enabling real-time analytics for vehicle monitoring, traffic flow optimization, and predictive fault detection across large-scale transportation networks. ![](/img/scenario-transportation-en.png) -## Scenario 4: Steel & Metallurgy +## 4. Steel & Metallurgy -#### **Background** +### 4.1 **Background** Facing increasing market competition and stringent environmental regulations, the steel and metallurgy industry is undergoing digital transformation. Industrial IoT platforms play a crucial role in optimizing production efficiency, improving product quality, and reducing energy consumption. Real-time data collection and analysis across smelting equipment, production lines, and supply chains enable intelligent monitoring, predictive maintenance, and precise process control. -#### **Architecture** +### 4.2 **Architecture** IoTDB’s powerful data storage and computing capabilities provide cross-platform compatibility, lightweight deployment options, and robust integration with industrial automation systems. Its ability to efficiently handle high-frequency time-series data empowers steel and metallurgy enterprises to implement smart manufacturing solutions and accelerate digitalization. ![](/img/scenario-steel-en.png) -## Scenario 5: IoT +## 5. IoT -#### **Background** +### 5.1 **Background** The Internet of Things (IoT) is driving digital transformation across industries by enabling real-time device connectivity and intelligent management. As IoT deployments scale, enterprises require a time-series data management system capable of processing vast data streams from edge devices to the cloud. Ensuring high-performance data storage, fast querying, and reliable synchronization is crucial for applications such as equipment monitoring, anomaly detection, and predictive maintenance. -#### **Architecture** +### 5.2 **Architecture** As a IoT-native high-performance time-series database, IoTDB supports end-to-end data synchronization and analysis from edge devices to the cloud. With high-concurrency processing capabilities, it meets the demands of large-scale device connectivity. IoTDB provides flexible data solutions to unlock deeper insights from operational data, improve efficiency, and drive comprehensive IoT business growth. diff --git a/src/UserGuide/Master/Table/QuickStart/QuickStart_apache.md b/src/UserGuide/Master/Table/QuickStart/QuickStart_apache.md index ea7846223..a7b242d34 100644 --- a/src/UserGuide/Master/Table/QuickStart/QuickStart_apache.md +++ b/src/UserGuide/Master/Table/QuickStart/QuickStart_apache.md @@ -23,7 +23,7 @@ This document will guide you through methods to get started quickly with IoTDB. -## How to Install and Deploy? +## 1. How to Install and Deploy? This guide will assist you in quickly installing and deploying IoTDB. You can quickly navigate to the content you need to review through the following document links: @@ -41,7 +41,7 @@ This guide will assist you in quickly installing and deploying IoTDB. You can qu > ❗️Note: We currently still recommend direct installation and deployment on physical/virtual machines. For Docker deployment, please refer to [Docker Deployment](../Deployment-and-Maintenance/Docker-Deployment_apache.md) -## How to Use IoTDB? +## 2. How to Use IoTDB? 1. Database Modeling Design: Database modeling is a crucial step in creating a database system, involving the design of data structures and relationships to ensure that the organization of data meets the needs of specific applications. The following documents will help you quickly understand IoTDB's modeling design: @@ -69,7 +69,7 @@ This guide will assist you in quickly installing and deploying IoTDB. You can qu 6. Application Programming Interfaces (APIs): IoTDB provides various application programming interfaces (APIs) to facilitate developers' interaction with IoTDB in applications. Currently supported interfaces include [Java Native API](../API/Programming-Java-Native-API_apache.md)、[Python Native API](../API/Programming-Python-Native-API.md)、[JDBC](../API/Programming-JDBC_apache.md), and more. For more programming interfaces, please refer to the [Application Programming Interfaces] section on the official website. -## Want to learn more technical details? +## 3. Want to learn more technical details? If you want to explore IoTDB’s internal mechanisms further, refer to the following documents: diff --git a/src/UserGuide/Master/Table/QuickStart/QuickStart_timecho.md b/src/UserGuide/Master/Table/QuickStart/QuickStart_timecho.md index 3bc70e462..388310388 100644 --- a/src/UserGuide/Master/Table/QuickStart/QuickStart_timecho.md +++ b/src/UserGuide/Master/Table/QuickStart/QuickStart_timecho.md @@ -23,7 +23,7 @@ This document will guide you through methods to get started quickly with IoTDB. -## How to Install and Deploy? +## 1. How to Install and Deploy? This guide will assist you in quickly installing and deploying IoTDB. You can quickly navigate to the content you need to review through the following document links: @@ -48,7 +48,7 @@ This guide will assist you in quickly installing and deploying IoTDB. You can qu - Monitoring Panel: Provides hundreds of database monitoring metrics for fine-grained monitoring of IoTDB and its operating system, assisting in system optimization, performance tuning, and bottleneck detection. For installation steps, please see [Monitoring-panel Deployment ](../Deployment-and-Maintenance/Monitoring-panel-deployment.md) -## How to Use IoTDB? +## 2. How to Use IoTDB? 1. Database Modeling Design: Database modeling is a crucial step in creating a database system, involving the design of data structures and relationships to ensure that the organization of data meets the needs of specific applications. The following documents will help you quickly understand IoTDB's modeling design: @@ -76,14 +76,14 @@ This guide will assist you in quickly installing and deploying IoTDB. You can qu 6. Application Programming Interfaces (APIs): IoTDB provides various application programming interfaces (APIs) to facilitate developers' interaction with IoTDB in applications. Currently supported interfaces include [Java Native API](../API/Programming-Java-Native-API_timecho.md)、[Python Native API](../API/Programming-Python-Native-API.md)、[JDBC](../API/Programming-JDBC_timecho.md), and more. For more programming interfaces, please refer to the [Application Programming Interfaces] section on the official website. -## What other convenient tools are available? +## 3. What other convenient tools are available? In addition to its own rich features, IoTDB is complemented by a comprehensive suite of peripheral tools. This guide will help you quickly understand and use these tools: - Monitoring Panel: A tool for detailed monitoring of IoTDB and its operating system, covering hundreds of database monitoring indicators such as database performance and system resources, helping system optimization and bottleneck identification. For a detailed usage introduction, please refer to [Monitor Tool](../Tools-System/Monitor-Tool_timecho.md) -## Want to learn more technical details? +## 4. Want to learn more technical details? If you want to explore IoTDB’s internal mechanisms further, refer to the following documents: diff --git a/src/UserGuide/Master/Table/Reference/Sample-Data.md b/src/UserGuide/Master/Table/Reference/Sample-Data.md index b838cd49b..966de22c6 100644 --- a/src/UserGuide/Master/Table/Reference/Sample-Data.md +++ b/src/UserGuide/Master/Table/Reference/Sample-Data.md @@ -18,15 +18,16 @@ under the License. --> +# Sample Data This section introduces a simple time-series data application scenario, along with the modeling and sample data for this scenario. All example SQL statements in the IoTDB Table Model User Guide can be executed using this modeling and sample data. -## Data Structure +## 1. Data Structure The structures of `table1` and `table2` are as follows: ![](/img/sample-dataset-en-01.png) -## Import Statements +## 2. Import Statements Below are the SQL statements to create the above table structures and insert data. You can download the complete SQL script ([sample_data.sql](/img/sample_data.sql)) to execute these statements in the CLI to import the data into IoTDB. diff --git a/src/UserGuide/Master/Table/Reference/Status-Codes.md b/src/UserGuide/Master/Table/Reference/Status-Codes.md index 339a19d7d..39fef7022 100644 --- a/src/UserGuide/Master/Table/Reference/Status-Codes.md +++ b/src/UserGuide/Master/Table/Reference/Status-Codes.md @@ -1,3 +1,25 @@ + +# Status Codes + IoTDB introduces the concept of status codes. For example, since IoTDB needs to register a time series before writing data, one possible solution is: ```Plain diff --git a/src/UserGuide/Master/Table/Reference/System-Config-Manual.md b/src/UserGuide/Master/Table/Reference/System-Config-Manual.md index 360f5e8b6..44e49f3b3 100644 --- a/src/UserGuide/Master/Table/Reference/System-Config-Manual.md +++ b/src/UserGuide/Master/Table/Reference/System-Config-Manual.md @@ -1,4 +1,26 @@ -### IoTDB Configuration Files + +# Configuration and Parameters + +## 1. IoTDB Configuration Files The configuration files for IoTDB are located in the `conf` folder under the IoTDB installation directory. Key configuration files include: @@ -15,18 +37,18 @@ The configuration files for IoTDB are located in the `conf` folder under the IoT 1. Template for the `iotdb-system.properties` file. 2. Provides a reference for all available configuration parameters. -### Modify Configurations +## 2. Modify Configurations -#### 1. **Modify Existing Parameters**: +### 2.1 **Modify Existing Parameters**: - Parameters already present in the `iotdb-system.properties` file can be directly modified. -#### 2. **Adding New Parameters**: +### 2.2 **Adding New Parameters**: - For parameters not listed in `iotdb-system.properties`, you can find them in the `iotdb-system.properties.template` file. - Copy the desired parameter from the template file to `iotdb-system.properties` and modify its value. -### Configuration Update Methods +### 2.3 Configuration Update Methods Different configuration parameters have different update methods, categorized as follows: @@ -42,11 +64,11 @@ Different configuration parameters have different update methods, categorized as - `load configuration`: Reloads the configuration. - `set configuration`: Updates specific configuration parameters. -## Environment Parameters +## 3. Environment Parameters The environment configuration files (`confignode-env.sh/bat` and `datanode-env.sh/bat`) are used to configure Java environment parameters for ConfigNode and DataNode, such as JVM settings. These configurations are passed to the JVM when ConfigNode or DataNode starts. -### **confignode-env.sh/bat** +### 3.1 **confignode-env.sh/bat** - MEMORY_SIZE @@ -75,7 +97,7 @@ The environment configuration files (`confignode-env.sh/bat` and `datanode-env.s | Default | Depends on the `MEMORY_SIZE` configuration. | | Effective | Restart required | -### **datanode-env.sh/bat** +### 3.2 **datanode-env.sh/bat** - MEMORY_SIZE @@ -104,11 +126,11 @@ The environment configuration files (`confignode-env.sh/bat` and `datanode-env.s | Default | Depends on the `MEMORY_SIZE` configuration. | | Effective | Restart required | -## System Parameters (`iotdb-system.properties.template`) +## 4. System Parameters (`iotdb-system.properties.template`) The `iotdb-system.properties` file contains various configurations for managing IoTDB clusters, nodes, replication, directories, monitoring, SSL, connections, object storage, tier management, and REST services. Below is a detailed breakdown of the parameters: -### Cluster Configuration +### 4.1 Cluster Configuration - cluster_name @@ -120,7 +142,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Effective | Use CLI: `set configuration "cluster_name"="xxx"`. | | Note | Changes are distributed across nodes. Changes may not propagate to all nodes in case of network issues or node failures. Nodes that fail to update must manually modify `cluster_name` in their configuration files and restart. Under normal circumstances, it is not recommended to modify `cluster_name` by manually modifying configuration files or to perform hot-loading via `load configuration` method. | -### Seed ConfigNode +### 4.2 Seed ConfigNode - cn_seed_config_node @@ -140,7 +162,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 127.0.0.1:10710 | | Effective | Modify before the first startup. | -### Node RPC Configuration +### 4.3 Node RPC Configuration - cn_internal_address @@ -241,7 +263,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 5000 | | Effective | Restart required. | -### Replication configuration +### 4.4 Replication configuration - config_node_consensus_protocol_class @@ -288,7 +310,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | org.apache.iotdb.consensus.iot.IoTConsensus | | Effective | Modify before the first startup. | -### Directory configuration +### 4.5 Directory configuration - cn_system_dir @@ -416,7 +438,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | data/datanode/system/pipe/consensus/deletion(Windows:data\\datanode\\system\\pipe\\consensus\\deletion) | | Effective | Restart required | -### Metric Configuration +### 4.6 Metric Configuration - cn_metric_reporter_list @@ -499,7 +521,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | IOTDB | | Effective | Restart required. | -### SSL Configuration +### 4.7 SSL Configuration - enable_thrift_ssl @@ -537,7 +559,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | None | | Effective | Restart required. | -### Connection Configuration +### 4.8 Connection Configuration - cn_rpc_thrift_compression_enable @@ -683,7 +705,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 300 | | Effective | Restart required. | -### Object storage management +### 4.9 Object storage management - remote_tsfile_cache_dirs @@ -757,7 +779,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | None | | Effective | Restart required. | -### Tier management +### 4.10 Tier management - dn_default_space_usage_thresholds @@ -795,7 +817,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 10485760 | | Effective | Hot reload. | -### REST Service Configuration +### 4.11 REST Service Configuration - enable_rest_service @@ -896,7 +918,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 5000 | | Effective | Restart required. | -### Load balancing configuration +### 4.12 Load balancing configuration - series_slot_num @@ -988,7 +1010,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | true | | Effective | Restart required. | -### Cluster management +### 4.13 Cluster management - time_partition_origin @@ -1029,7 +1051,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 0.05 | | Effective | Restart required. | -### Memory Control Configuration +### 4.14 Memory Control Configuration - datanode_memory_proportion @@ -1157,7 +1179,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | true | | Effective | Hot reload. | -### Schema Engine Configuration +### 4.15 Schema Engine Configuration - schema_engine_mode @@ -1249,7 +1271,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | -1 | | Effective | Restart required. | -### Configurations for creating schema automatically +### 4.16 Configurations for creating schema automatically - enable_auto_create_schema @@ -1359,7 +1381,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | PLAIN | | Effective | Restart required. | -### Query Configurations +### 4.17 Query Configurations - read_consistency_level @@ -1532,7 +1554,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 10 | | Effective | Hot reload | -### TTL Configuration +### 4.18 TTL Configuration - ttl_check_interval @@ -1561,7 +1583,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 0.3 | | Effective | Restart required. | -### Storage Engine Configuration +### 4.19 Storage Engine Configuration - timestamp_precision @@ -1725,7 +1747,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | -1 | | Effective | Restart required. | -### Compaction Configurations +### 4.20 Compaction Configurations - enable_seq_space_compaction @@ -2033,7 +2055,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 4 | | Effective | Hot reload | -### Write Ahead Log Configuration +### 4.21 Write Ahead Log Configuration - wal_mode @@ -2161,7 +2183,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | true | | Effective | Hot reload | -### **IoTConsensus Configuration** +### 4.22 **IoTConsensus Configuration** - data_region_iot_max_log_entries_num_per_batch @@ -2208,7 +2230,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 33554432 | | Effective | Restart required. | -### TsFile Configurations +### 4.23 TsFile Configurations - group_size_in_byte @@ -2300,7 +2322,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | None | | Effective | Restart required. | -### Authorization Configuration +### 4.24 Authorization Configuration - authorizer_provider_class @@ -2357,7 +2379,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 30 | | Effective | Restart required. | -### UDF Configuration +### 4.25 UDF Configuration - udf_initial_byte_array_length_for_memory_control @@ -2395,7 +2417,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | ext/udf(Windows:ext\\udf) | | Effective | Restart required. | -### Trigger Configuration +### 4.26 Trigger Configuration - trigger_lib_dir @@ -2415,7 +2437,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 3 | | Effective | Restart required. | -### **Select-Into Configuration** +### 4.27 **Select-Into Configuration** - into_operation_buffer_size_in_byte @@ -2444,7 +2466,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 2 | | Effective | Restart required. | -### Continuous Query Configuration +### 4.28 Continuous Query Configuration - continuous_query_submit_thread_count @@ -2464,7 +2486,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 1000 | | Effective | Restart required. | -### Pipe Configuration +### 4.29 Pipe Configuration - pipe_lib_dir @@ -2538,7 +2560,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | -1 | | Effective | Hot reload | -### RatisConsensus Configuration +### 4.30 RatisConsensus Configuration - config_node_ratis_log_appender_buffer_size_max @@ -2999,7 +3021,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 86400 (s) | | Effective | Restart required. | -### IoTConsensusV2 Configuration +### 4.31 IoTConsensusV2 Configuration - iot_consensus_v2_pipeline_size @@ -3019,7 +3041,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | batch | | Effective | Restart required. | -### Procedure Configuration +### 4.32 Procedure Configuration - procedure_core_worker_thread_count @@ -3048,7 +3070,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 60(s) | | Effective | Restart required. | -### MQTT Broker Configuration +### 4.33 MQTT Broker Configuration - enable_mqtt_service @@ -3104,7 +3126,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 1048576 | | Effective | Hot reload | -### Audit log Configuration +### 4.34 Audit log Configuration - enable_audit_log @@ -3142,7 +3164,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | true | | Effective | Restart required. | -### White List Configuration +### 4.35 White List Configuration - enable_white_list @@ -3153,7 +3175,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | false | | Effective | Hot reload | -### IoTDB-AI Configuration +### 4.36 IoTDB-AI Configuration - model_inference_execution_thread_count @@ -3164,7 +3186,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 5 | | Effective | Restart required. | -### Load TsFile Configuration +### 4.37 Load TsFile Configuration - load_clean_up_task_execution_delay_time_seconds @@ -3229,7 +3251,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 5 | | Effective | Restart required. | -### Dispatch Retry Configuration +### 4.38 Dispatch Retry Configuration - enable_retry_for_unknown_error diff --git a/src/UserGuide/Master/Table/SQL-Manual/Basis-Function.md b/src/UserGuide/Master/Table/SQL-Manual/Basis-Function.md index f8a5cf354..6dfbac129 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/Basis-Function.md +++ b/src/UserGuide/Master/Table/SQL-Manual/Basis-Function.md @@ -21,9 +21,9 @@ # Basic Functions -## Comparison Functions and Operators +## 1. Comparison Functions and Operators -### 1. Basic Comparison Operators +### 1.1 Basic Comparison Operators Comparison operators are used to compare two values and return the comparison result (`true` or `false`). @@ -37,14 +37,14 @@ Comparison operators are used to compare two values and return the comparison re | <> | Not equal to | | != | Not equal to | -#### 1.1 Comparison rules: +#### 1.1.1 Comparison rules: 1. All types can be compared with themselves. 2. Numeric types (INT32, INT64, FLOAT, DOUBLE, TIMESTAMP) can be compared with each other. 3. Character types (STRING, TEXT) can also be compared with each other. 4. Comparisons between types other than those mentioned above will result in an error. -### 2. BETWEEN Operator +### 1.2 BETWEEN Operator 1. The `BETWEEN `operator is used to determine whether a value falls within a specified range. 2. The `NOT BETWEEN` operator is used to determine whether a value does not fall within a specified range. @@ -72,7 +72,7 @@ Example 2 : NOT BETWEEN SELECT * FROM table1 WHERE humidity NOT BETWEEN 35.0 AND 40.0; ``` -### 3. IS NULL Operator +### 1.3 IS NULL Operator 1. These operators apply to all data types. @@ -88,7 +88,7 @@ Example 2: Query records where humidity is not NULL SELECT * FROM table1 WHERE humidity IS NOT NULL; ``` -### 4. IN Operator +### 1.4 IN Operator 1. The `IN` operator can be used in the `WHERE `clause to compare a column with a list of values. 2. These values can be provided by a static array or scalar expressions. @@ -119,15 +119,15 @@ Example 3: Query records where region is not 'Beijing' or 'Shanghai' SELECT * FROM table1 WHERE region NOT IN ('Beijing', 'Shanghai'); ``` -## Aggregate functions +## 2. Aggregate functions -### 1. Overview +### 2.1 Overview 1. Aggregate functions are many-to-one functions. They perform aggregate calculations on a set of values to obtain a single aggregate result. 2. Except for `COUNT()`, all other aggregate functions ignore null values and return null when there are no input rows or all values are null. For example, `SUM()` returns null instead of zero, and `AVG()` does not include null values in the count. -### 2. Supported Aggregate Functions +### 2.2 Supported Aggregate Functions | Function Name | Description | Allowed Input Types | Output Type | | :------------ | :----------------------------------------------------------- | :------------------------- | :----------------------------------------- | @@ -151,13 +151,13 @@ SELECT * FROM table1 WHERE region NOT IN ('Beijing', 'Shanghai'); | FIRST_BY | FIRST_BY(x, y) finds the value of x in the same row when y is the first non-null value. | x and y can be of any type | Same as the data type of the first input x | | LAST_BY | LAST_BY(x, y) finds the value of x in the same row when y is the last non-null value. | x and y can be of any type | Same as the data type of the first input x | -### 3. Examples +### 2.3 Examples -#### 3.1 Example Data +#### 2.3.1 Example Data The [Example Data page](../Reference/Sample-Data.md) contains SQL statements for building table structures and inserting data. Download and execute these statements in the IoTDB CLI to import the data into IoTDB. You can use this data to test and execute the SQL statements in the examples and obtain the corresponding results. -#### 3.2 Count +#### 2.3.2 Count Counts the number of rows in the entire table and the number of non-null values in the `temperature` column. @@ -179,7 +179,7 @@ Total line number = 1 It costs 0.834s ``` -#### 3.3 First +#### 2.3.3 First Finds the values with the smallest timestamp that are not NULL in the `temperature` and `humidity` columns. @@ -199,7 +199,7 @@ Total line number = 1 It costs 0.170s ``` -#### 3.4 Last +#### 2.3.4 Last Finds the values with the largest timestamp that are not NULL in the `temperature` and `humidity` columns. @@ -219,7 +219,7 @@ Total line number = 1 It costs 0.211s ``` -#### 3.5 First_by +#### 2.3.5 First_by Finds the `time` value of the row with the smallest timestamp that is not NULL in the `temperature` column, and the `humidity` value of the row with the smallest timestamp that is not NULL in the `temperature` column. @@ -239,7 +239,7 @@ Total line number = 1 It costs 0.269s ``` -#### 3.6 Last_by +#### 2.3.6 Last_by Queries the `time` value of the row with the largest timestamp that is not NULL in the `temperature` column, and the `humidity` value of the row with the largest timestamp that is not NULL in the `temperature` column. @@ -259,7 +259,7 @@ Total line number = 1 It costs 0.070s ``` -#### 3.7 Max_by +#### 2.3.7 Max_by Queries the `time` value of the row where the `temperature` column is at its maximum, and the `humidity` value of the row where the `temperature` column is at its maximum. @@ -279,7 +279,7 @@ Total line number = 1 It costs 0.172s ``` -#### 3.8 Min_by +#### 2.3.8 Min_by Queries the `time` value of the row where the `temperature` column is at its minimum, and the `humidity` value of the row where the `temperature` column is at its minimum. @@ -299,9 +299,9 @@ Total line number = 1 It costs 0.244s ``` -## Logical operators +## 3. Logical operators -### 1. Overview +### 3.1 Overview Logical operators are used to combine conditions or negate conditions, returning a Boolean result (`true` or `false`). @@ -313,9 +313,9 @@ Below are the commonly used logical operators along with their descriptions: | OR | True if either value is true | a OR b | | NOT | True when the value is false | NOT a | -### 2. Impact of NULL on Logical Operators +### 3.2 Impact of NULL on Logical Operators -#### 2.1 AND Operator +#### 3.2.1 AND Operator - If one or both sides of the expression are `NULL`, the result may be `NULL`. - If one side of the `AND` operator is `FALSE`, the expression result is `FALSE`. @@ -328,7 +328,7 @@ NULL AND false -- false NULL AND NULL -- null ``` -#### 2.2 OR Operator +#### 3.2.2 OR Operator - If one or both sides of the expression are `NULL`, the result may be `NULL`. - If one side of the `OR` operator is `TRUE`, the expression result is `TRUE`. @@ -341,7 +341,7 @@ NULL OR false -- null NULL OR true -- true ``` -##### 2.2.1 Truth Table +##### 3.2.2.1 Truth Table The following truth table illustrates how `NULL` is handled in `AND` and `OR` operators: @@ -357,7 +357,7 @@ The following truth table illustrates how `NULL` is handled in `AND` and `OR` op | NULL | FALSE | FALSE | NULL | | NULL | NULL | NULL | NULL | -#### 2.3 NOT Operator +#### 3.2.3 NOT Operator The logical negation of `NULL` remains `NULL`. @@ -367,7 +367,7 @@ Example: NOT NULL -- null ``` -##### 2.3.1 Truth Table +##### 3.2.3.1 Truth Table The following truth table illustrates how `NULL` is handled in the `NOT` operator: @@ -377,17 +377,17 @@ The following truth table illustrates how `NULL` is handled in the `NOT` operato | FALSE | TRUE | | NULL | NULL | -## Date and Time Functions and Operators +## 4. Date and Time Functions and Operators -### 1. now() -> Timestamp +### 4.1 now() -> Timestamp Returns the current timestamp. -### 2. date_bin(interval, Timestamp[, Timestamp]) -> Timestamp +### 4.2 date_bin(interval, Timestamp[, Timestamp]) -> Timestamp The `date_bin` function is used for handling time data by rounding a timestamp (`Timestamp`) to the boundary of a specified time interval (`interval`). -## **Syntax:** +#### **Syntax:** ```SQL -- Calculates the time interval starting from timestamp 0 and returns the nearest interval boundary to the specified timestamp. @@ -401,7 +401,7 @@ date_bin(interval,source,origin) --source: Must be of timestamp type. ``` -### **Parameters**: +#### **Parameters**: | Parameter | Description | | :-------- | :----------------------------------------------------------- | @@ -409,7 +409,7 @@ date_bin(interval,source,origin) | source | 1. The timestamp column or expression to be calculated. 2. Must be of timestamp type. | | origin | The reference timestamp. | -### 2.1Syntax Rules : +#### 4.2.1Syntax Rules : 1. If `origin` is not specified, the default reference timestamp is `1970-01-01T00:00:00Z` (Beijing time: `1970-01-01 08:00:00`). 2. `interval` must be a non-negative number with a time unit. If `interval` is `0ms`, the function returns `source` directly without calculation. @@ -419,13 +419,13 @@ date_bin(interval,source,origin) > For example, if the starting point is **April 30, 2000**, calculating `1 DAY` first and then `1 MONTH` results in **June 1, 2000**, whereas calculating `1 MONTH` first and then `1 DAY` results in **May 31, 2000**. The resulting dates are different. -#### 2.2 Examples +#### 4.2.2 Examples ##### Example Data The [Example Data page](../Reference/Sample-Data.md) contains SQL statements for building table structures and inserting data. Download and execute these statements in the IoTDB CLI to import the data into IoTDB. You can use this data to test and execute the SQL statements in the examples and obtain the corresponding results. -### Example 1: Without Specifying the Origin Timestamp +#### Example 1: Without Specifying the Origin Timestamp ```SQL SELECT @@ -464,7 +464,7 @@ Total line number = 18 It costs 0.683s ``` -### Example 2: Specifying the Origin Timestamp +#### Example 2: Specifying the Origin Timestamp ```SQL SELECT @@ -503,7 +503,7 @@ Total line number = 18 It costs 0.056s ``` -### Example 3: Negative Origin +#### Example 3: Negative Origin ```SQL SELECT @@ -542,7 +542,7 @@ Total line number = 18 It costs 0.203s ``` -### Example 4: Interval of 0 +#### Example 4: Interval of 0 ```SQL SELECT @@ -581,7 +581,7 @@ Total line number = 18 It costs 0.107s ``` -### Example 5: Source is NULL +#### Example 5: Source is NULL ```SQL SELECT @@ -620,9 +620,9 @@ Total line number = 18 It costs 0.319s ``` -## Mathematical Functions and Operators +## 5. Mathematical Functions and Operators -### 1. Mathematical Operators +### 5.1 Mathematical Operators | **Operator** | **Description** | | :----------- | :---------------------------------------------- | @@ -633,7 +633,7 @@ It costs 0.319s | % | Modulus (remainder) | | - | Negation | -### 2. Mathematical functions +### 5.2 Mathematical functions | Function Name | Description | Input | Output | Usage | | :------------------------------- | :----------------------------------------------------------- | :-------------------------- | :----------------- | :--------- | @@ -662,13 +662,13 @@ It costs 0.319s | pi | Pi (π) | | double | pi() | -## Conditional Expressions +## 6. Conditional Expressions -### 1.CASE +### 6.1 CASE CASE expressions come in two forms: **Simple CASE** and **Searched CASE**. -#### 1.1 Simple CASE +#### 6.1.1 Simple CASE The simple form evaluates each value expression from left to right until it finds a match with the given expression: @@ -693,7 +693,7 @@ SELECT a, END ``` -#### 1.2 Searched CASE +#### 6.1.2 Searched CASE The searched form evaluates each Boolean condition from left to right until a `TRUE` condition is found, then returns the corresponding result: @@ -718,7 +718,7 @@ SELECT a, b, END ``` -### 2. COALESCE +### 6.2 COALESCE Returns the first non-null value from the given list of parameters. @@ -726,11 +726,11 @@ Returns the first non-null value from the given list of parameters. coalesce(value1, value2[, ...]) ``` -## Conversion Functions +## 7. Conversion Functions -### 1. Conversion Functions +### 7.1 Conversion Functions -#### 1.1 cast(value AS type) → type +#### 7.1.1 cast(value AS type) → type Explicitly converts a value to the specified type. This can be used to convert strings (`VARCHAR`) to numeric types or numeric values to string types. @@ -745,7 +745,7 @@ SELECT * IN (CAST('2024-11-27' AS DATE), CAST('2024-11-28' AS DATE)); ``` -#### 1.2 try_cast(value AS type) → type +#### 7.1.2 try_cast(value AS type) → type Similar to `CAST()`. If the conversion fails, returns `NULL` instead of throwing an error. @@ -758,19 +758,19 @@ SELECT * IN (try_cast('2024-11-27' AS DATE), try_cast('2024-11-28' AS DATE)); ``` -## String Functions and Operators +## 8. String Functions and Operators -### 1. String operators +### 8.1 String operators -#### 1.1 || Operator +#### 8.1.1 || Operator The `||` operator is used for string concatenation and functions the same as the `concat` function. -#### 1.2 LIKE Statement +#### 8.1.2 LIKE Statement The `LIKE` statement is used for pattern matching. For detailed usage, refer to Pattern Matching:[LIKE](#1-like-运算符). -### 2. String Functions +### 8.2 String Functions | Function Name | Description | Input | Output | Usage | | :------------ | :----------------------------------------------------------- | :----------------------------------------------------------- | :------ | :----------------------------------------------------------- | @@ -788,33 +788,33 @@ The `||` operator is used for string concatenation and functions the same as the | `substring` | Extracts a substring from `start_index` to the end of the string. **Notes:** - `start_index` starts at `1`. - Returns `NULL` if input is `NULL`. - Throws an error if `start_index` is greater than string length. | `string`, `start_index` | String | substring(string from start_index)or substring(string, start_index) | | `substring` | Extracts a substring of `length` characters starting from `start_index`. **Notes:** - `start_index` starts at `1`. - Returns `NULL` if input is `NULL`. - Throws an error if `start_index` is greater than string length. - Throws an error if `length` is negative. - If `start_index + length` exceeds `int.MAX`, an overflow error may occur. | `string`, `start_index`, `length` | String | substring(string from start_index for length) or substring(string, start_index, length) | -## Pattern Matching Functions +## 9. Pattern Matching Functions -### 1. LIKE +### 9.1 LIKE -#### 1.1 Usage +#### 9.1.1 Usage The `LIKE `operator is used to compare a value with a pattern. It is commonly used in the `WHERE `clause to match specific patterns within strings. -#### 1.2 Syntax +#### 9.1.2 Syntax ```SQL ... column [NOT] LIKE 'pattern' ESCAPE 'character'; ``` -#### 1.3 Match rules +#### 9.1.3 Match rules - Matching characters is case-sensitive - The pattern supports two wildcard characters: - `_` matches any single character - `%` matches zero or more characters -#### 1.4 Notes +#### 9.1.4 Notes - `LIKE` pattern matching applies to the entire string by default. Therefore, if it's desired to match a sequence anywhere within a string, the pattern must start and end with a percent sign. - To match the escape character itself, double it (e.g., `\\` to match `\`). For example, you can use `\\` to match for `\`. -#### 1.5 Examples +#### 9.1.5 Examples #### **Example 1: Match Strings Starting with a Specific Character** @@ -856,19 +856,19 @@ SELECT * FROM table1 WHERE continent LIKE 'South\_%' ESCAPE '\'; SELECT * FROM table1 WHERE continent LIKE 'South\\%' ESCAPE '\'; ``` -### 2. regexp_like +### 9.2 regexp_like -#### 2.1 Usage +#### 9.2.1 Usage Evaluates whether the regular expression pattern is present within the given string. -#### 2.2 Syntax +#### 9.2.2 Syntax ```SQL regexp_like(string, pattern); ``` -#### 2.3 Notes +#### 9.2.3 Notes - The pattern for `regexp_like` only needs to be contained within the string, and does not need to match the entire string. - To match the entire string, use the `^` and `$` anchors. @@ -891,7 +891,7 @@ regexp_like(string, pattern); 4. Categories: Specify directly, without the need for `Is`, `general_category=`, or `gc=` prefixes (e.g., `\p{L}`). 5. Binary properties: Specify directly, without `Is` (e.g., `\p{NoncharacterCodePoint}`). -#### 2.4 Examples +#### 9.2.4 Examples #### Example 1: **Matching strings containing a specific pattern** diff --git a/src/UserGuide/Master/Table/SQL-Manual/Featured-Functions.md b/src/UserGuide/Master/Table/SQL-Manual/Featured-Functions.md index 0634e3b7f..c85dd00f7 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/Featured-Functions.md +++ b/src/UserGuide/Master/Table/SQL-Manual/Featured-Functions.md @@ -18,31 +18,24 @@ under the License. --> - # Featured Functions -## Time-Series Specific Functions - -### 1. Downsampling Functions +## 1. Downsampling Functions -#### 1.1 `date_bin` Function +### 1.1 `date_bin` Function -##### Description: +#### **Description:** The `date_bin` function is a scalar function that aligns timestamps to the start of specified time intervals. It is commonly used with the `GROUP BY` clause for downsampling. - **Partial Intervals May Be Empty:** Only timestamps that meet the conditions are aligned; missing intervals are not filled. - **All Intervals Return Empty:** If no data exists within the query range, the downsampling result is an empty set. -##### Usage Examples - -###### Example Data - +#### **Usage** **Examples****:** -The [Example Data page](../Reference/Sample-Data.md) contains SQL statements for building table structures and inserting data. Download and execute these statements in the IoTDB CLI to import the data into IoTDB. You can use this data to test and execute the SQL statements in the examples and obtain the corresponding results. +**Sample Dataset****:** The example data page contains SQL statements for building table structures and inserting data. Download and execute these statements in the IoTDB CLI to import the data into IoTDB. You can use this data to test and execute the SQL statements in the examples and obtain the corresponding results. - -Example 1: Hourly Average Temperature for Device 100 +**Example 1: Hourly Average Temperature for Device 100** ```SQL SELECT date_bin(1h, time) AS hour_time, avg(temperature) AS avg_temp @@ -52,7 +45,7 @@ WHERE (time >= 2024-11-27 00:00:00 AND time <= 2024-11-30 00:00:00) GROUP BY 1; ``` -Result: +**Result****:** ```Plain +-----------------------------+--------+ @@ -67,7 +60,7 @@ Result: +-----------------------------+--------+ ``` -Example 2: Hourly Average Temperature for Each Device +**Example 2: Hourly Average Temperature for Each Device** ```SQL SELECT date_bin(1h, time) AS hour_time, device_id, avg(temperature) AS avg_temp @@ -76,7 +69,7 @@ WHERE time >= 2024-11-27 00:00:00 AND time <= 2024-11-30 00:00:00 GROUP BY 1, device_id; ``` -Result: +**Result:** ```Plain +-----------------------------+---------+--------+ @@ -119,30 +112,30 @@ SELECT date_bin(1h, time) AS hour_time, avg(temperature) AS avg_temp +-----------------------------+--------+ ``` -#### 1.2 `date_bin_gapfill` Function +### 1.2 `date_bin_gapfill` Function -##### Description: +#### **Description:** The `date_bin_gapfill` function is an extension of `date_bin` that fills in missing time intervals, returning a complete time series. - **Partial Intervals May Be Empty**: Aligns timestamps for data that meets the conditions and fills in missing intervals. - **All Intervals Return Empty**: If no data exists within the query range, the result is an empty set. -##### Limitations: +#### **Limitations:** -- The function must always be used with the `GROUP BY` clause. If used elsewhere, it behaves like `date_bin` without gap-filling. -- A `GROUP BY` clause can contain only one instance of date_bin_gapfill. Multiple calls will result in an error. -- The `GAPFILL` operation occurs after the `HAVING` clause and before the `FILL` clause. -- The `WHERE` clause must include time filters in one of the following forms: - - `time >= XXX AND time <= XXX` - - `time > XXX AND time < XXX` - - `time BETWEEN XXX AND XXX` -- If additional time filters or conditions are used, an error is raised. Time conditions and other value filters must be connected using the `AND` operator. -- If `startTime` and `endTime` cannot be inferred from the `WHERE` clause, an error is raised. +1. The function must always be used with the `GROUP BY` clause. If used elsewhere, it behaves like `date_bin` without gap-filling. +2. A `GROUP BY` clause can contain only one instance of date_bin_gapfill. Multiple calls will result in an error. +3. The `GAPFILL` operation occurs after the `HAVING` clause and before the `FILL` clause. +4. The `WHERE` clause must include time filters in one of the following forms: + 1. `time >= XXX AND time <= XXX` + 2. `time > XXX AND time < XXX` + 3. `time BETWEEN XXX AND XXX` +5. If additional time filters or conditions are used, an error is raised. Time conditions and other value filters must be connected using the `AND` operator. +6. If `startTime` and `endTime` cannot be inferred from the `WHERE` clause, an error is raised. -##### Usage Examples +**Usage** **Examples****:** -Example 1: Fill Missing Intervals +**Example 1: Fill Missing Intervals** ```SQL SELECT date_bin_gapfill(1h, time) AS hour_time, avg(temperature) AS avg_temp @@ -152,7 +145,7 @@ WHERE (time >= 2024-11-28 07:00:00 AND time <= 2024-11-28 16:00:00) GROUP BY 1; ``` -Result: +**Result:** ```Plain +-----------------------------+--------+ @@ -171,7 +164,7 @@ Result: +-----------------------------+--------+ ``` -Example 2: Fill Missing Intervals with Device Grouping +**Example 2: Fill Missing Intervals with Device Grouping** ```SQL SELECT date_bin_gapfill(1h, time) AS hour_time, device_id, avg(temperature) AS avg_temp @@ -180,7 +173,7 @@ WHERE time >= 2024-11-28 07:00:00 AND time <= 2024-11-28 16:00:00 GROUP BY 1, device_id; ``` -Result: +**Result:** ```Plain +-----------------------------+---------+--------+ @@ -199,7 +192,7 @@ Result: +-----------------------------+---------+--------+ ``` -Example 3: Empty Result Set for No Data in Range +**Example 3: Empty Result Set for No Data in Range** ```SQL SELECT date_bin_gapfill(1h, time) AS hour_time, device_id, avg(temperature) AS avg_temp @@ -208,7 +201,7 @@ WHERE time >= 2024-11-27 09:00:00 AND time <= 2024-11-27 14:00:00 GROUP BY 1, device_id; ``` -Result: +**Result:** ```Plain +---------+---------+--------+ @@ -217,41 +210,41 @@ Result: +---------+---------+--------+ ``` -### 2. DIFF Function +## 2. `DIFF` Function -##### Description: +### 2.1 **Description:** -The `DIFF` function calculates the difference between the current row and the previous row. For the first row, it returns `NULL` since there is no previous row. +- The `DIFF` function calculates the difference between the current row and the previous row. For the first row, it returns `NULL` since there is no previous row. -##### Function Definition: +### 2.2 **Function Definition:** ``` DIFF(numberic[, boolean]) -> Double ``` -##### Parameters +### 2.3 **Parameters:** -- First Parameter (numeric): +#### **First Parameter (numeric):** - - **Type**: Must be numeric (`INT32`, `INT64`, `FLOAT`, `DOUBLE`). - - **Purpose**: Specifies the column for which to calculate the difference. +- **Type**: Must be numeric (`INT32`, `INT64`, `FLOAT`, `DOUBLE`). +- **Purpose**: Specifies the column for which to calculate the difference. -- Second Parameter (boolean, optional): +#### **Second Parameter (boolean, optional):** - - **Type**: Boolean (`true` or `false`). - - **Default**: `true`. - - **Purpose**: - - `true`: Ignores `NULL` values and uses the first non-`NULL` value for calculation. If no non-`NULL` value exists, returns `NULL`. - - `false`: Does not ignore `NULL` values. If the previous row is `NULL`, the result is `NULL`. +- **Type**: Boolean (`true` or `false`). +- **Default**: `true`. +- **Purpose**: + - `true`: Ignores `NULL` values and uses the first non-`NULL` value for calculation. If no non-`NULL` value exists, returns `NULL`. + - `false`: Does not ignore `NULL` values. If the previous row is `NULL`, the result is `NULL`. -##### Notes: +### 2.4 **Notes:** - In **tree models**, the second parameter must be specified as `'ignoreNull'='true'` or `'ignoreNull'='false'`. - In **table models**, simply use `true` or `false`. Using `'ignoreNull'='true'` or `'ignoreNull'='false'` in table models results in a string comparison and always evaluates to `false`. -##### Usage Examples +### 2.5 **Usage** **Examples****:** -**Example 1: Ignore NULL Values** +#### **Example 1: Ignore NULL Values** ```SQL SELECT time, DIFF(temperature) AS diff_temp @@ -259,7 +252,7 @@ FROM table1 WHERE device_id = '100'; ``` -Result: +**Result:** ```Plain +-----------------------------+---------+ @@ -276,7 +269,7 @@ Result: +-----------------------------+---------+ ``` -Example 2: Do Not Ignore NULL Values +#### **Example 2: Do Not Ignore NULL Values** ```SQL SELECT time, DIFF(temperature, false) AS diff_temp @@ -284,7 +277,7 @@ FROM table1 WHERE device_id = '100'; ``` -Result: +**Result:** ```Plain +-----------------------------+---------+ @@ -301,7 +294,7 @@ Result: +-----------------------------+---------+ ``` -Example 3: Full Example +#### **Example 3: Full Example** ```SQL SELECT time, temperature, @@ -311,7 +304,7 @@ FROM table1 WHERE device_id = '100'; ``` -Result: +**Result:** ```Plain +-----------------------------+-----------+-----------+-----------+ @@ -326,4 +319,4 @@ Result: |2024-11-26T13:37:00.000+08:00| 90.0| 2.0| 2.0| |2024-11-26T13:38:00.000+08:00| 90.0| 0.0| 0.0| +-----------------------------+-----------+-----------+-----------+ -``` +``` \ No newline at end of file diff --git a/src/UserGuide/Master/Table/SQL-Manual/Fill-Clause.md b/src/UserGuide/Master/Table/SQL-Manual/Fill-Clause.md index a708cc763..bf745bd7a 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/Fill-Clause.md +++ b/src/UserGuide/Master/Table/SQL-Manual/Fill-Clause.md @@ -22,14 +22,14 @@ # FILL Clause -## 1 Function Introduction +## 1. Function Introduction During data queries, you may encounter scenarios where certain columns have missing data in some rows, resulting in NULL values in the result set. These NULL values can hinder data visualization and analysis. To address this, IoTDB provides the FILL clause to populate these NULL values. - If the query includes an `ORDER BY` clause, the FILL clause is executed before `ORDER BY`. - If a `GAPFILL` (e.g., `date_bin_gapfill` function) operation exists, the FILL clause is executed after `GAPFILL`. -## 2 Syntax Overview +## 2. Syntax Overview ```sql @@ -91,7 +91,7 @@ Only one filling method can be specified, and it applies to all columns in the r **Note:** Columns with data types not supporting the specified filling method will remain unchanged without errors. -## 3 Sample Dataset +## 3. Sample Dataset The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. @@ -313,7 +313,7 @@ Total line number = 7 It costs 0.073s ``` -## 4 Advanced Usage +## 4. Advanced Usage When using the `PREVIOUS` or `LINEAR` FILL methods, the `FILL_GROUP` parameter allows filling within specific groups without being influenced by other groups. @@ -410,7 +410,7 @@ Total line number = 8 It costs 0.089s ``` -## 5 Special Notes +## 5. Special Notes When using `LINEAR` or `PREVIOUS` FILL methods, if the auxiliary time column (used to determine filling logic) contains NULL values, IoTDB follows these rules: diff --git a/src/UserGuide/Master/Table/SQL-Manual/From-Join-Clause.md b/src/UserGuide/Master/Table/SQL-Manual/From-Join-Clause.md index e561a9e03..06c1835b1 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/From-Join-Clause.md +++ b/src/UserGuide/Master/Table/SQL-Manual/From-Join-Clause.md @@ -21,7 +21,7 @@ # FROM & JOIN Clause -## 1 Syntax Overview +## 1. Syntax Overview ```sql FROM relation (',' relation)* @@ -60,11 +60,11 @@ qualifiedName ; ``` -## 2 FROM Clause Syntax +## 2. FROM Clause Syntax The `FROM` clause specifies the data sources for the query. Logically, query execution begins with the `FROM` clause. It can include a single table, a combination of multiple tables joined using `JOIN` clauses, or a subquery containing another `SELECT` query. -## 3 JOIN Clause +## 3. JOIN Clause The `JOIN` clause combines two tables based on specific conditions, typically predicates, but other implicit rules can also apply. @@ -120,7 +120,7 @@ An **outer join** returns rows even when no matching records exist in the other IoTDB currently supports only `FULL [OUTER] JOIN`. This type returns all records from both tables. If a record in one table has no match in the other, `NULL` values are returned for the unmatched fields. `FULL JOIN` **must use explicit join conditions**. -## 4 Example Queries +## 4. Example Queries The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/Master/Table/SQL-Manual/GroupBy-Clause.md b/src/UserGuide/Master/Table/SQL-Manual/GroupBy-Clause.md index 6522f34eb..082ab52c5 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/GroupBy-Clause.md +++ b/src/UserGuide/Master/Table/SQL-Manual/GroupBy-Clause.md @@ -21,7 +21,7 @@ # GROUP BY Clause -## 1 Syntax Overview +## 1. Syntax Overview ```sql GROUP BY expression (',' expression)* @@ -32,7 +32,7 @@ GROUP BY expression (',' expression)* ![](/img/groupby01.png) -## 2 Notes +## 2. Notes #### 2.1 Items in the `SELECT` Clause @@ -209,7 +209,7 @@ Total line number = 1 It costs 0.047s ``` -## 3 Sample Data and Usage Examples +## 3. Sample Data and Usage Examples The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/Master/Table/SQL-Manual/Having-Clause.md b/src/UserGuide/Master/Table/SQL-Manual/Having-Clause.md index 8b2b68afe..72f921b2a 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/Having-Clause.md +++ b/src/UserGuide/Master/Table/SQL-Manual/Having-Clause.md @@ -21,7 +21,7 @@ # HAVING Clause -## 1 Syntax Overview +## 1. Syntax Overview ```sql HAVING booleanExpression @@ -36,7 +36,7 @@ The `HAVING` clause is used to filter aggregated results after a `GROUP BY` oper In terms of syntax, the `HAVING` clause is similar to the `WHERE` clause. However, while `WHERE` filters rows before grouping and aggregation, `HAVING` filters the results after grouping and aggregation. -## 2 Sample Data and Usage Examples +## 2. Sample Data and Usage Examples The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/Master/Table/SQL-Manual/Identifier.md b/src/UserGuide/Master/Table/SQL-Manual/Identifier.md index 782fecf47..cd695a6cf 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/Identifier.md +++ b/src/UserGuide/Master/Table/SQL-Manual/Identifier.md @@ -23,7 +23,7 @@ In IoTDB, identifiers are used to represent the names of databases, tables, columns, functions, and other objects. -## 1 Naming Rules +## 1. Naming Rules 1. **Starting Character**: An identifier must begin with a letter. 2. **Subsequent Characters**: Identifiers can include letters, digits, and underscores. @@ -50,7 +50,7 @@ table-name // contains a hyphen colum$name@field // contains special characters and is not enclosed in double quotes ``` -## 2 Case Sensitivity +## 2. Case Sensitivity Identifiers in IoTDB are case-insensitive. The system does not preserve the original case of identifiers during storage, but query results display column names in the same case as specified in the SELECT clause of the query. diff --git a/src/UserGuide/Master/Table/SQL-Manual/Limit-Offset-Clause.md b/src/UserGuide/Master/Table/SQL-Manual/Limit-Offset-Clause.md index 9a321e361..6a803f6ef 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/Limit-Offset-Clause.md +++ b/src/UserGuide/Master/Table/SQL-Manual/Limit-Offset-Clause.md @@ -21,7 +21,7 @@ # LIMIT & OFFSET Clause -## 1 Syntax Overview +## 1. Syntax Overview ```sql OFFSET INTEGER_VALUE LIMIT INTEGER_VALUE @@ -46,7 +46,7 @@ The `OFFSET` clause works in conjunction with the `LIMIT` clause to skip a speci - If the total number of rows (`n`) is greater than or equal to the sum of `OFFSET` and `LIMIT`, the query returns `LIMIT` rows. - If the total number of rows (`n`) is less than the sum of `OFFSET` and `LIMIT`, the query returns rows from `OFFSET` to the end of the dataset, up to a maximum of `n - OFFSET`. -## 2 Sample Data and Usage Examples +## 2. Sample Data and Usage Examples The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/Master/Table/SQL-Manual/OrderBy-Clause.md b/src/UserGuide/Master/Table/SQL-Manual/OrderBy-Clause.md index 347e4cfab..a9348f990 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/OrderBy-Clause.md +++ b/src/UserGuide/Master/Table/SQL-Manual/OrderBy-Clause.md @@ -23,7 +23,7 @@ The `ORDER BY` clause is used to sort the result set of a query at its final stage based on specified sorting conditions. -## 1 Syntax Overview +## 1. Syntax Overview ```sql ORDER BY sortItem (',' sortItem)* @@ -40,7 +40,7 @@ sortItem - By default, sorting is applied as `ASC NULLS LAST`, meaning values are sorted in ascending order and `NULL` values are placed at the end. Users can manually specify other parameters to override the default behavior. - The `ORDER BY` clause is executed before the `LIMIT` or `OFFSET` clauses. -## 2 Example Data +## 2. Example Data The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/Master/Table/SQL-Manual/Select-Clause.md b/src/UserGuide/Master/Table/SQL-Manual/Select-Clause.md index 32018c2ad..5d940d4d1 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/Select-Clause.md +++ b/src/UserGuide/Master/Table/SQL-Manual/Select-Clause.md @@ -23,7 +23,7 @@ **SELECT Clause** specifies the columns included in the query results. -## 1 Syntax Overview +## 1. Syntax Overview ```sql SELECT selectItem (',' selectItem)* @@ -37,7 +37,7 @@ selectItem - It supports aggregate functions (e.g., `SUM`, `AVG`, `COUNT`) and window functions, logically executed last in the query process. -## 2 Detailed Syntax: +## 2. Detailed Syntax: Each `selectItem` can take one of the following forms: @@ -46,7 +46,7 @@ Each `selectItem` can take one of the following forms: 3. **All Columns in the Result Set**: `*` selects all columns returned by the query. Column aliases are not allowed. -## 3 Example Data +## 3. Example Data The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. @@ -250,7 +250,7 @@ Total line number = 18 It costs 0.189s ``` -## 4 Column Order in the Result Set +## 4. Column Order in the Result Set - **Column Order**: The order of columns in the result set matches the order specified in the `SELECT` clause. - **Multi-column Expressions**: If a selection expression produces multiple columns, their order follows the order in the source relation.p. \ No newline at end of file diff --git a/src/UserGuide/Master/Table/SQL-Manual/Where-Clause.md b/src/UserGuide/Master/Table/SQL-Manual/Where-Clause.md index 630f36277..200f73d0f 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/Where-Clause.md +++ b/src/UserGuide/Master/Table/SQL-Manual/Where-Clause.md @@ -21,7 +21,7 @@ # WHERE Clauses -## 1 Syntax Overview +## 1. Syntax Overview ```sql WHERE booleanExpression @@ -29,7 +29,7 @@ WHERE booleanExpression The `WHERE` clause is used to specify filter conditions in an SQL query. It is executed immediately after the `FROM` clause. -## 2 Example Data +## 2. Example Data The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/Master/Table/SQL-Manual/overview.md b/src/UserGuide/Master/Table/SQL-Manual/overview.md index 89bc8cd65..0ef5cbc2e 100644 --- a/src/UserGuide/Master/Table/SQL-Manual/overview.md +++ b/src/UserGuide/Master/Table/SQL-Manual/overview.md @@ -21,7 +21,7 @@ # Overview -## 1 Syntax Overview +## 1. Syntax Overview ```SQL SELECT ⟨select_list⟩ diff --git a/src/UserGuide/Master/Table/Technical-Insider/Cluster-data-partitioning.md b/src/UserGuide/Master/Table/Technical-Insider/Cluster-data-partitioning.md index 2a3f54fe7..f9f37e622 100644 --- a/src/UserGuide/Master/Table/Technical-Insider/Cluster-data-partitioning.md +++ b/src/UserGuide/Master/Table/Technical-Insider/Cluster-data-partitioning.md @@ -18,25 +18,25 @@ under the License. --> - +# Partitioning and Load Balance This document introduces the partitioning strategies and load balance strategies in IoTDB. According to the characteristics of time series data, IoTDB partitions them by series and time dimensions. Combining a series partition with a time partition creates a partition, the unit of division. To enhance throughput and reduce management costs, these partitions are evenly allocated to RegionGroups, which serve as the unit of replication. The RegionGroup's Regions then determine the storage location, with the leader Region managing the primary load. During this process, the Region placement strategy determines which nodes will host the replicas, while the leader selection strategy designates which Region will act as the leader. -### Partitioning Strategy and Partition Allocation +## 1. Partitioning Strategy and Partition Allocation IoTDB implements a tailored partitioning algorithm for time-series data. Based on this, the partition information cached on the ConfigNode and DataNode is not only easy to manage but also clearly distinguishes between hot and cold data. Subsequently, balanced partitions are evenly distributed across the RegionGroups in the cluster to achieve storage balance. -#### Partitioning Strategy +### 1.1 Partitioning Strategy IoTDB maps each sensor in a production environment to a time series. It then uses a **series** **partitioning algorithm** to partition the time series for schema management and a **time partitioning algorithm** to manage the data. The figure below illustrates how IoTDB partitions time-series data. ![](/img/partition_table_en.png) -##### Partitioning Algorithms +#### Partitioning Algorithms Since a large number of devices and sensors are typically deployed in production environments, IoTDB uses a series partitioning algorithm to ensure that the size of partition information remains manageable. As the generated time series are associated with timestamps, IoTDB uses a time partitioning algorithm to clearly distinguish between hot and cold partitions. -###### Series Partitioning Algorithm +##### Series Partitioning Algorithm By default, IoTDB limits the number of series partitions to 1,000 and configures the series partitioning algorithm as a **hash partitioning algorithm**. This provides the following benefits: @@ -45,7 +45,7 @@ By default, IoTDB limits the number of series partitions to 1,000 and configures Furthermore, if the actual load in the production environment can be estimated more accurately, the sequence partitioning algorithm can be configured as a custom hash or list partitioning algorithm to achieve a more uniform load distribution across all sequence partitions. -###### Time Partitioning Algorithm +##### Time Partitioning Algorithm The time partitioning algorithm converts a given timestamp into the corresponding time partition using the following formula: @@ -53,21 +53,21 @@ $$\left\lfloor\frac{\text{Timestamp} - \text{StartTimestamp}}{\text{TimePartitio In this formula, $\text{StartTimestamp}$ and $\text{TimePartitionInterval}$ are configurable parameters to adapt to different production environments. $\text{StartTimestamp}$ represents the start time of the first time partition, while $\text{TimePartitionInterval}$ defines the duration of each time partition. By default, $\text{TimePartitionInterval}$ is set to seven days. -##### Schema Partitioning +#### Schema Partitioning Since the series partitioning algorithm evenly partitions the time series, each series partition corresponds to a schema partition. These schema partitions are then evenly distributed across **SchemaRegionGroups** to achieve balanced schema distribution. -##### Data Partitioning +#### Data Partitioning Data partitions are created by combining series partitions and time partitions. Since the series partitioning algorithm evenly partitions the time series, the load of data partitions within a specific time partition remains balanced. These data partitions are then evenly distributed across **DataRegionGroups** to achieve balanced data distribution. -#### Partition Allocation +### 1.2 Partition Allocation IoTDB uses RegionGroups to achieve elastic storage for time-series data. The number of RegionGroups in the cluster is determined by the total resources of all DataNodes. Since the number of RegionGroups is dynamic, IoTDB can easily scale. Both SchemaRegionGroups and DataRegionGroups follow the same partition allocation algorithm, which evenly divides all series partitions. The figure below illustrates the partition allocation process, where dynamically expanding RegionGroups match the continuously expanding time series and cluster. ![](/img/partition_allocation_en.png) -##### RegionGroup Expansion +#### RegionGroup Expansion The number of RegionGroups is given by the following formula: @@ -75,17 +75,17 @@ $$\text{RegionGroupNumber} = \left\lfloor\frac{\sum_{i=1}^{\text{DataNodeNumber} In this formula, $\text{RegionNumber}_i$ represents the number of Regions expected to be hosted on the $i$-th DataNode, and $\text{ReplicationFactor}$ denotes the number of Regions within each RegionGroup. Both $\text{RegionNumber}_i$ and $\text{ReplicationFactor}$ are configurable parameters. $\text{RegionNumber}_i$ can be determined based on the available hardware resources (e.g., CPU cores, memory size) on the $i$-th DataNode to adapt to different physical servers. $\text{ReplicationFactor}$ can be adjusted to ensure different levels of fault tolerance. -##### Allocation Strategy +#### Allocation Strategy Both the SchemaRegionGroup and the DataRegionGroup follow the same allocation algorithm--splitting all series partitions evenly. As a result, each SchemaRegionGroup holds the same number of schema partitions, ensuring balanced schema storage. Similarly, for each time partition, each DataRegionGroup acquires the data partitions corresponding to the series partitions it holds. Consequently, the data partitions within a time partition are evenly distributed across all DataRegionGroups, ensuring balanced data storage in each time partition. Notably, IoTDB effectively leverages the characteristics of time series data. When the TTL (Time to Live) is configured, IoTDB enables migration-free elastic storage for time series data. This feature facilitates cluster expansion while minimizing the impact on online operations. The figures above illustrate an instance of this feature: newborn data partitions are evenly allocated to each DataRegion, and expired data are automatically archived. As a result, the cluster's storage will eventually remain balanced. -### Load Balancing Strategies +## 2. Load Balancing Strategies To improve cluster availability and performance, IoTDB employs carefully designed storage balancing and computation balancing algorithms. -#### Storage Balancing +### 2.1 Storage Balancing The number of Regions held by a DataNode reflects its storage load. If the number of Regions varies significantly between DataNodes, the DataNode with more Regions may become a storage bottleneck. Although a simple Round Robin placement algorithm can achieve storage balancing by ensuring each DataNode holds an equal number of Regions, it reduces the cluster's fault tolerance, as shown below: @@ -101,7 +101,7 @@ In this scenario, if DataNode $n_2$ fails, the load previously handled by DataN To address this issue, IoTDB employs a Region placement algorithm that not only evenly distributes Regions across all DataNodes but also ensures that each DataNode can offload its storage to sufficient other DataNodes in the event of a failure. As a result, the cluster achieves balanced storage distribution and a high level of fault tolerance, ensuring its availability. -#### Computation Balancing +### 2.2 Computation Balancing The number of leader Regions held by a DataNode reflects its Computing load. If the difference in the number of leaders across DataNodes is relatively large, the DataNode with more leaders is likely to become a Computing bottleneck. If the leader selection process is conducted using a transparent Greedy algorithm, the result may be an unbalanced leader distribution when the Regions are fault-tolerantly placed, as demonstrated below: @@ -117,7 +117,7 @@ Note that the above steps strictly follow the Greedy algorithm. However, by step To address this issue, IoTDB adopts a **leader selection algorithm** that continuously balances the distribution of leader across the cluster. As a result, the cluster achieves balanced computation load distribution, ensuring its performance. -### Source Code +## 3. Source Code - [Data Partitioning](https://github.com/apache/iotdb/tree/master/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition) - [Partition Allocation](https://github.com/apache/iotdb/tree/master/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition) diff --git a/src/UserGuide/Master/Table/Technical-Insider/Encoding-and-Compression.md b/src/UserGuide/Master/Table/Technical-Insider/Encoding-and-Compression.md index d1546bead..fedf3c03e 100644 --- a/src/UserGuide/Master/Table/Technical-Insider/Encoding-and-Compression.md +++ b/src/UserGuide/Master/Table/Technical-Insider/Encoding-and-Compression.md @@ -18,10 +18,11 @@ under the License. --> +# Encoding and Compression IoTDB employs various encoding and compression techniques to enhance storage efficiency and reduce I/O operations during data writing and reading. Below is a detailed explanation of the supported encoding and compression methods. -## **Encoding Methods** +## 1. **Encoding Methods** IoTDB supports multiple encoding methods tailored for different data types to optimize storage and performance. @@ -77,7 +78,7 @@ A lossless encoding method combining prediction, ZigZag encoding, bit packing, a A lossless encoding method combining differential encoding, bit packing, run-length encoding, Fibonacci encoding, and concatenation. It is suitable for time-series data with a small and steadily increasing trend but is not effective for highly fluctuating data. -### **Data Types and Supported Encoding Methods** +#### **Data Types and Supported Encoding Methods** The following table summarizes the recommended and supported encoding methods for each data type: @@ -101,11 +102,11 @@ IoTDB> create timeseries root.ln.wf02.wt02.status WITH DATATYPE=BOOLEAN, ENCODIN Msg: 507: encoding TS_2DIFF does not support BOOLEAN ``` -## **Compression Methods** +## 2. **Compression Methods** When the time series is written and encoded as binary data according to the specified type, IoTDB applies compression techniques to further enhance storage efficiency. While both encoding and compression aim to optimize storage, encoding techniques are typically designed for specific data types (e.g., second-order differential encoding is only suitable for INT32 or INT64, and storing floating-point numbers requires multiplying them by 10ⁿ to convert them into integers) before converting the data into a binary stream. Compression methods like SNAPPY operate on the binary stream, making them independent of the data type. -### **Supported Compression Methods** +### 2.1 **Supported Compression Methods** IoTDB allows specifying the compression method of a column when creating a time series. Currently, IoTDB supports the following compression methods: @@ -116,7 +117,7 @@ IoTDB allows specifying the compression method of a column when creating a time - ZSTD - LZMA2 -### **Compression Ratio Statistics** +### 2.2 **Compression Ratio Statistics** IoTDB provides compression ratio statistics to monitor the effectiveness of compression. The statistics are stored in:`data/datanode/system/compression_ratio` diff --git a/src/UserGuide/Master/Table/Tools-System/Benchmark.md b/src/UserGuide/Master/Table/Tools-System/Benchmark.md index b46184f7d..af31651f4 100644 --- a/src/UserGuide/Master/Table/Tools-System/Benchmark.md +++ b/src/UserGuide/Master/Table/Tools-System/Benchmark.md @@ -18,8 +18,9 @@ under the License. --> +# Benchmark -## **Basic Overview** +## 1. **Basic Overview** IoT-benchmark is a time-series database benchmarking tool developed in Java for big data environments. It was developed and open-sourced by the School of Software, Tsinghua University. The tool is user-friendly, supports various write and query methods, allows storing test information and results for further queries or analysis, and integrates with Tableau for visualizing test results. @@ -50,7 +51,7 @@ Currently, IoT-benchmark supports the following time series databases, versions | KairosDB | -- | HTTP Request | | IoTDB | v2.0 v1.x v0.13 | JDBC, SessionByTablet, SessionByRecord, SessionByRecords | -## **Installation and Operation** +## 2. **Installation and Operation** #### **Prerequisites** @@ -144,7 +145,7 @@ All test log files are stored in the `logs` folder, while test results are saved - MIN: Minimum operation latency. - Pn: Quantile values of the overall operation distribution (e.g., P25 represents the 25th percentile, or lower quartile). -## **Main** **Parameters** +## 3. **Main** **Parameters** #### IoTDB Service Model @@ -352,7 +353,7 @@ Then the test process with 3 LOOP parameters of 10, 20, and 50 is executed in se > tail -f log_info.log ``` -## Test Example +## 4. Test Example This example demonstrates how to configure and run an IoT-benchmark test with IoTDB 2.0 using the table model for writing and querying. diff --git a/src/UserGuide/Master/Table/Tools-System/CLI.md b/src/UserGuide/Master/Table/Tools-System/CLI.md index 9b5db7a7a..f83d8759d 100644 --- a/src/UserGuide/Master/Table/Tools-System/CLI.md +++ b/src/UserGuide/Master/Table/Tools-System/CLI.md @@ -18,12 +18,13 @@ under the License. --> +# CLI The IoTDB Command Line Interface (CLI) tool allows users to interact with the IoTDB server. Before using the CLI tool to connect to IoTDB, ensure that the IoTDB service is running correctly. This document explains how to launch the CLI and its related parameters. In this manual, `$IOTDB_HOME` represents the installation directory of IoTDB. -### CLI Launch +## 1. CLI Launch The CLI client script is located in the `$IOTDB_HOME/sbin` directory. The common commands to start the CLI tool are as follows: @@ -62,9 +63,9 @@ The figure below indicates a successful startup: ![](/img/Cli-01.png) -### Example Commands +## 2. Example Commands -#### **Create a Database** +### 2.1 **Create a Database** ```Java create database test @@ -73,7 +74,7 @@ create database test ![](/img/Cli-02.png) -#### **Show Databases** +### 2.2 **Show Databases** ```Java show databases ``` @@ -81,11 +82,11 @@ show databases ![](/img/Cli-03.png) -### CLI Exit +## 3. CLI Exit To exit the CLI and terminate the session, type`quit`or`exit`. -### Additional Notes and Shortcuts +### 3.1 Additional Notes and Shortcuts 1. **Navigate Command History:** Use the up and down arrow keys. 2. **Auto-Complete Commands:** Use the right arrow key. diff --git a/src/UserGuide/Master/Table/Tools-System/Maintenance-Tool_apache.md b/src/UserGuide/Master/Table/Tools-System/Maintenance-Tool_apache.md index 1194c7883..fdcdbdc9e 100644 --- a/src/UserGuide/Master/Table/Tools-System/Maintenance-Tool_apache.md +++ b/src/UserGuide/Master/Table/Tools-System/Maintenance-Tool_apache.md @@ -21,11 +21,11 @@ # Cluster Management Tools -## Data Directory Overview Tool +## 1. Data Directory Overview Tool The IoTDB data directory overview tool is designed to print out the structural overview information of the data directory. The tool is located at `tools/tsfile/print-iotdb-data-dir`. -### Usage +### 1.1 Usage - **Windows:** @@ -41,7 +41,7 @@ The IoTDB data directory overview tool is designed to print out the structural o **Note:** If the output result storage path is not set, the relative path `"IoTDB_data_dir_overview.txt"` will be used as the default. -### Example +### 1.2 Example Taking Windows system as an example: @@ -82,11 +82,11 @@ data dir num: 1 |============================================================== ````````````````````````` -## TsFile Overview Tool +## 2. TsFile Overview Tool The TsFile overview tool is used to print the content of a TsFile in a sketch mode. The tool is located at `tools/tsfile/print-tsfile`. -### Usage +### 2.1 Usage - **Windows:** @@ -102,7 +102,7 @@ The TsFile overview tool is used to print the content of a TsFile in a sketch mo **Note:** If the output result storage path is not set, the relative path `"TsFile_sketch_view.txt"` will be used as the default. -### Example +### 2.2 Example Taking Windows system as an example: @@ -170,11 +170,11 @@ file length: 2974 - The "|||||||||||||||||||||" is added for enhanced readability and is not actual data stored in the TsFile. - The final printed "IndexOfTimerseriesIndex Tree" is a reorganized print of the metadata index tree at the end of the TsFile for intuitive understanding and is not the actual data stored in the TsFile. -## TsFile Resource Overview Tool +## 3. TsFile Resource Overview Tool The TsFile resource overview tool is used to print out the content of TsFile resource files. The tool is located at `tools/tsfile/print-tsfile-resource-files`. -### Usage +### 3.1 Usage - **Windows:** @@ -188,7 +188,7 @@ The TsFile resource overview tool is used to print out the content of TsFile res ./print-tsfile-resource-files.sh ``` -### Example +### 3.2 Example Taking Windows system as an example: diff --git a/src/UserGuide/Master/Table/Tools-System/Maintenance-Tool_timecho.md b/src/UserGuide/Master/Table/Tools-System/Maintenance-Tool_timecho.md index 0c60ab937..f16c251c2 100644 --- a/src/UserGuide/Master/Table/Tools-System/Maintenance-Tool_timecho.md +++ b/src/UserGuide/Master/Table/Tools-System/Maintenance-Tool_timecho.md @@ -18,14 +18,15 @@ under the License. --> +# Maintenance Tool -## IoTDB-OpsKit +## 1. IoTDB-OpsKit The IoTDB OpsKit is an easy-to-use operation and maintenance tool designed for TimechoDB (Enterprise-grade product based on Apache IoTDB). It helps address the operational and maintenance challenges of multi-node distributed IoTDB deployments by providing functionalities such as cluster deployment, start/stop management, elastic scaling, configuration updates, and data export. With one-click command execution, it simplifies the management of complex database clusters and significantly reduces operational complexity. This document provides guidance on remotely deploying, configuring, starting, and stopping IoTDB cluster instances using the cluster management tool. -### Prerequisites +### 1.1 Prerequisites The IoTDB OpsKit requires GLIBC 2.17 or later, which means the minimum supported operating system version is CentOS 7. The target machines for IoTDB deployment must have the following dependencies installed: @@ -38,7 +39,7 @@ If any of these dependencies are missing, please install them manually. The last > **Note:** The IoTDB cluster management tool requires **root privileges** to execute. -### Deployment +### 1.2 Deployment #### Download and Installation @@ -64,7 +65,7 @@ iotdbctl cluster check example /sbin/iotdbctl cluster check example ``` -### Cluster Configuration Files +### 1.3 Cluster Configuration Files The cluster configuration files are stored in the `iotdbctl/config` directory as YAML files. @@ -192,7 +193,7 @@ If metrics are enabled in `iotdb-system.properties` (in `config/xxx.yaml`), the - **Handling Special Characters in YAML Keys**: If a YAML key value contains special characters (such as `:`), it is recommended to enclose the entire value in double quotes (`""`). - **Avoid Spaces in File Paths**: Paths containing spaces may cause parsing errors in some configurations. -### Usage Scenarios +### 1.4 Usage Scenarios #### Data Cleanup @@ -346,7 +347,7 @@ iotdbctl cluster start default_cluster For detailed parameters, refer to the **Cluster Configuration Files** section above. -### Command Reference +### 1.5 Command Reference The basic command structure is: @@ -392,7 +393,7 @@ iotdbctl cluster deploy default_cluster | importschema | Import metadata. | Cluster name,-N nodename -param paramters | | exportschema | Export metadata. | Cluster name,-N nodename -param paramters | -### Detailed Command Execution Process +### 1.6 Detailed Command Execution Process The following examples use `default_cluster.yaml` as a reference. Users can modify the commands according to their specific cluster configuration files. @@ -935,7 +936,7 @@ iotdbctl cluster exportschema default_cluster -N datanode1 -param "-t ./ -pf ./p | -lpf | Specify the maximum number of lines per exported file (Default: 10,000). | NO | | -timeout | Specify the session query timeout in milliseconds. | NO | -### Introduction to Cluster Deployment Tool Samples +### 1.7 Introduction to Cluster Deployment Tool Samples In the cluster deployment tool installation directory (config/example), there are three YAML configuration examples. If needed, you can copy and modify them for your deployment. @@ -945,11 +946,11 @@ In the cluster deployment tool installation directory (config/example), there ar | default_3c3d.yaml | Example configuration for 3 ConfigNodes and 3 DataNodes. | | default_3c3d_grafa_prome | Example configuration for 3 ConfigNodes, 3 DataNodes, Grafana, and Prometheus. | -## IoTDB Data Directory Overview Tool +## 2. IoTDB Data Directory Overview Tool The IoTDB Data Directory Overview Tool provides an overview of the IoTDB data directory structure. It is located at `tools/tsfile/print-iotdb-data-dir`. -### Usage +### 2.1 Usage - For Windows: @@ -965,7 +966,7 @@ The IoTDB Data Directory Overview Tool provides an overview of the IoTDB data di **Note:** If the output path is not specified, the default relative path `IoTDB_data_dir_overview.txt` will be used. -### Example +### 2.2 Example Use Windows in this example: @@ -1006,11 +1007,11 @@ data dir num:1 |============================================================== ~~~ -## TsFile Sketch Tool +## 3. TsFile Sketch Tool The TsFile Sketch Tool provides a summarized view of the content within a TsFile. It is located at `tools/tsfile/print-tsfile`. -### Usage +### 3.1 Usage - For Windows: @@ -1026,7 +1027,7 @@ The TsFile Sketch Tool provides a summarized view of the content within a TsFile **Note:** If the output path is not specified, the default relative path `TsFile_sketch_view.txt` will be used. -### Example +### 3.2 Example Use Windows in this example: @@ -1094,11 +1095,11 @@ Explanations: - The `"||||||||||||||||||||"` lines are added for readability and are not part of the actual TsFile data. - The final `"IndexOfTimerseriesIndex Tree"` section reorganizes the metadata index tree at the end of the TsFile. This view aids understanding but does not represent actual stored data. -## TsFile Resource Sketch Tool +## 4. TsFile Resource Sketch Tool The TsFile Resource Sketch Tool displays details about TsFile resource files. It is located at `tools/tsfile/print-tsfile-resource-files`. -### Usage +### 4.1 Usage - For Windows: @@ -1112,7 +1113,7 @@ The TsFile Resource Sketch Tool displays details about TsFile resource files. It ./print-tsfile-resource-files.sh ``` -### Example +### 4.2 Example Use Windows in this example: diff --git a/src/UserGuide/Master/Table/Tools-System/Monitor-Tool_apache.md b/src/UserGuide/Master/Table/Tools-System/Monitor-Tool_apache.md index 5e29a0fa1..77a5f9bde 100644 --- a/src/UserGuide/Master/Table/Tools-System/Monitor-Tool_apache.md +++ b/src/UserGuide/Master/Table/Tools-System/Monitor-Tool_apache.md @@ -23,7 +23,7 @@ The deployment of monitoring tools can be referenced in the document [Monitoring Panel Deployment](../Deployment-and-Maintenance/Monitoring-panel-deployment.md) chapter. -## Prometheus Mapping Relationship for Monitoring Metrics +## 1. Prometheus Mapping Relationship for Monitoring Metrics > For a monitoring metric with Metric Name as `name`, Tags as `K1=V1, ..., Kn=Vn`, the following mapping applies, where `value` is the specific value. @@ -35,7 +35,7 @@ The deployment of monitoring tools can be referenced in the document [Monitoring | Rate | `name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn"} value`
`name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", rate="m1"} value`
`name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", rate="m5"} value`
`name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", rate="m15"} value`
`name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", rate="mean"} value` | | Timer | `name_seconds_max{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn"} value`
`name_seconds_sum{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn"} value`
`name_seconds_count{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn"} value`
`name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", quantile="0.5"} value`
`name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", quantile="0.99"} value` | -## Modifying Configuration Files +## 2. Modifying Configuration Files 1) Taking DataNode as an example, modify the `iotdb-system.properties` configuration file as follows: @@ -59,7 +59,7 @@ file_count{name="seq",} 2.0 ... ``` -## Prometheus + Grafana +## 3. Prometheus + Grafana As shown above, IoTDB exposes monitoring metrics in the standard Prometheus format. You can use Prometheus to collect and store these metrics and Grafana to visualize them. @@ -97,7 +97,7 @@ For more details, refer to the following documents: - [Grafana Installation and Usage Documentation](https://grafana.com/docs/grafana/latest/getting-started/getting-started/) - [Grafana Querying Data from Prometheus and Plotting Documentation](https://prometheus.io/docs/visualization/grafana/#grafana-support-for-prometheus) -## Apache IoTDB Dashboard +## 4. Apache IoTDB Dashboard The `Apache IoTDB Dashboard` is a companion product of IoTDB Enterprise Edition, supporting unified centralized operation and maintenance management. It allows monitoring multiple clusters through a single monitoring panel. You can contact the business team to obtain the Dashboard's JSON file. @@ -105,7 +105,7 @@ The `Apache IoTDB Dashboard` is a companion product of IoTDB Enterprise Edition, ![Apache IoTDB Dashboard](/img/%E7%9B%91%E6%8E%A7%20cluster2.png) -### Cluster Overview +### 4.1 Cluster Overview You can monitor, but not limited to: @@ -118,7 +118,7 @@ You can monitor, but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E6%A6%82%E8%A7%88.png) -### Data Writing +### 4.2 Data Writing You can monitor, but not limited to: @@ -128,7 +128,7 @@ You can monitor, but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E5%86%99%E5%85%A5.png) -### Data Query +### 4.3 Data Query You can monitor, but not limited to: @@ -142,7 +142,7 @@ You can monitor, but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E6%9F%A5%E8%AF%A2.png) -### Storage Engine +### 4.4 Storage Engine You can monitor, but not limited to: @@ -152,7 +152,7 @@ You can monitor, but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E5%AD%98%E5%82%A8%E5%BC%95%E6%93%8E.png) -### System Monitoring +### 4.5 System Monitoring You can monitor, but not limited to: diff --git a/src/UserGuide/Master/Table/Tools-System/Monitor-Tool_timecho.md b/src/UserGuide/Master/Table/Tools-System/Monitor-Tool_timecho.md index 4b5d7d5da..c300671bc 100644 --- a/src/UserGuide/Master/Table/Tools-System/Monitor-Tool_timecho.md +++ b/src/UserGuide/Master/Table/Tools-System/Monitor-Tool_timecho.md @@ -18,10 +18,11 @@ under the License. --> +# Monitor Tool -## **Prometheus** **Integration** +## 1. **Prometheus** **Integration** -### **Prometheus Metric Mapping** +### 1.1 **Prometheus Metric Mapping** The following table illustrates the mapping of IoTDB metrics to the Prometheus-compatible format. For a given metric with `Metric Name = name` and tags `K1=V1, ..., Kn=Vn`, the mapping follows this pattern, where `value` represents the actual measurement. @@ -33,7 +34,7 @@ The following table illustrates the mapping of IoTDB metrics to the Prometheus-c | Rate | name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value
name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="m1"} value
name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="m5"} value
name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="m15"} value
name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="mean"} value | | Timer | name_seconds_max{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value
name_seconds_sum{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value
name_seconds_count{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value
name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", quantile="0.5"} value
name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", quantile="0.99"} value | -### **Configuration File** +### 1.2 **Configuration File** To enable Prometheus metric collection in IoTDB, modify the configuration file as follows: @@ -58,7 +59,7 @@ file_count{name="seq",} 2.0 ... ``` -### **Prometheus + Grafana** **Integration** +### 1.3 **Prometheus + Grafana** **Integration** IoTDB exposes monitoring data in the standard Prometheus-compatible format. Prometheus collects and stores these metrics, while Grafana is used for visualization. @@ -102,7 +103,7 @@ For more details, refer to: - [Grafana getting_started](https://grafana.com/docs/grafana/latest/getting-started/getting-started/) - [Grafana query metrics from Prometheus](https://prometheus.io/docs/visualization/grafana/#grafana-support-for-prometheus) -## **Apache IoTDB Dashboard** +## 2. **Apache IoTDB Dashboard** We introduce the Apache IoTDB Dashboard, designed for unified centralized operations and management, which enables monitoring multiple clusters through a single panel. @@ -112,7 +113,7 @@ We introduce the Apache IoTDB Dashboard, designed for unified centralized operat You can access the Dashboard's Json file in TimechoDB. -### **Cluster Overview** +### 2.1 **Cluster Overview** Including but not limited to: @@ -125,7 +126,7 @@ Including but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E6%A6%82%E8%A7%88.png) -### **Data Writing** +### 2.2 **Data Writing** Including but not limited to: @@ -135,7 +136,7 @@ Including but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E5%86%99%E5%85%A5.png) -### **Data Querying** +### 2.3 **Data Querying** Including but not limited to: @@ -149,7 +150,7 @@ Including but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E6%9F%A5%E8%AF%A2.png) -### **Storage Engine** +### 2.4 **Storage Engine** Including but not limited to: @@ -159,7 +160,7 @@ Including but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E5%AD%98%E5%82%A8%E5%BC%95%E6%93%8E.png) -### **System Monitoring** +### 2.5 **System Monitoring** Including but not limited to: diff --git a/src/UserGuide/Master/Table/User-Manual/Data-Sync_apache.md b/src/UserGuide/Master/Table/User-Manual/Data-Sync_apache.md index d6d84b652..02b233cb4 100644 --- a/src/UserGuide/Master/Table/User-Manual/Data-Sync_apache.md +++ b/src/UserGuide/Master/Table/User-Manual/Data-Sync_apache.md @@ -23,7 +23,7 @@ Data synchronization is a typical requirement in the Industrial Internet of Things (IIoT). Through data synchronization mechanisms, data sharing between IoTDB instances can be achieved, enabling the establishment of a complete data pipeline to meet needs such as internal and external network data exchange, edge-to-cloud synchronization, data migration, and data backup. -## 1 Functional Overview +## 1. Functional Overview ### 1.1 Data Synchronization @@ -43,7 +43,7 @@ By declaratively configuring these three parts in an SQL statement, flexible dat - Does not support data synchronization from IoTDB version 2.x series to version 1.x series. - When performing data synchronization tasks, avoid executing any deletion operations to prevent inconsistencies between the two ends. -## 2 Usage Instructions +## 2. Usage Instructions A data synchronization task can be in one of three states: RUNNING, STOPPED, and DROPPED. The state transitions of the task are illustrated in the diagram below: @@ -208,7 +208,7 @@ Detailed introduction of pre-installed plugins is as follows (for detailed param -## 3 Usage Examples +## 3. Usage Examples ### 3.1 Full Data Synchronization @@ -401,7 +401,7 @@ WITH SINK ( ``` -## 4 Reference: Notes +## 4. Reference: Notes You can adjust the parameters for data synchronization by modifying the IoTDB configuration file (`iotdb-system.properties`), such as the directory for storing synchronized data. The complete configuration is as follows: @@ -464,7 +464,7 @@ pipe_sink_max_client_number=16 pipe_all_sinks_rate_limit_bytes_per_second=-1 ``` -## 5 Reference: Parameter Description +## 5. Reference: Parameter Description ### 5.1 source parameter diff --git a/src/UserGuide/Master/Table/User-Manual/Data-Sync_timecho.md b/src/UserGuide/Master/Table/User-Manual/Data-Sync_timecho.md index 705f3ba4c..92a097141 100644 --- a/src/UserGuide/Master/Table/User-Manual/Data-Sync_timecho.md +++ b/src/UserGuide/Master/Table/User-Manual/Data-Sync_timecho.md @@ -22,7 +22,7 @@ Data synchronization is a typical requirement in the Industrial Internet of Things (IIoT). Through data synchronization mechanisms, data sharing between IoTDB instances can be achieved, enabling the establishment of a complete data pipeline to meet needs such as internal and external network data exchange, edge-to-cloud synchronization, data migration, and data backup. -## 1 Functional Overview +## 1. Functional Overview ### 1.1 Data Synchronization @@ -42,7 +42,7 @@ By declaratively configuring these three parts in an SQL statement, flexible dat - Does not support data synchronization from IoTDB version 2.x series to version 1.x series. - When performing data synchronization tasks, avoid executing any deletion operations to prevent inconsistencies between the two ends. -## 2 Usage Instructions +## 2. Usage Instructions A data synchronization task can be in one of three states: RUNNING, STOPPED, and DROPPED. The state transitions of the task are illustrated in the diagram below: @@ -209,7 +209,7 @@ Detailed introduction of pre-installed plugins is as follows (for detailed param -## 3 Usage Examples +## 3. Usage Examples ### 3.1 Full Data Synchronization @@ -418,7 +418,7 @@ WITH SINK ( ) ``` -## 4 Reference: Notes +## 4. Reference: Notes You can adjust the parameters for data synchronization by modifying the IoTDB configuration file (`iotdb-system.properties`), such as the directory for storing synchronized data. The complete configuration is as follows: @@ -491,7 +491,7 @@ pipe_air_gap_receiver_port=9780 pipe_all_sinks_rate_limit_bytes_per_second=-1 ``` -## 5 Reference: Parameter Description +## 5. Reference: Parameter Description ### 5.1 source parameter diff --git a/src/UserGuide/Master/Table/User-Manual/Query-Performance-Analysis.md b/src/UserGuide/Master/Table/User-Manual/Query-Performance-Analysis.md index 3b3c0c3e6..2fa83c6aa 100644 --- a/src/UserGuide/Master/Table/User-Manual/Query-Performance-Analysis.md +++ b/src/UserGuide/Master/Table/User-Manual/Query-Performance-Analysis.md @@ -18,6 +18,7 @@ under the License. --> +# Query Performance Analysis Query analysis helps users understand query execution mechanisms and identify performance bottlenecks, facilitating optimization and improving efficiency. This directly enhances user experience and resource utilization. IoTDB provides two query analysis statements: **`EXPLAIN`** and **`EXPLAIN ANALYZE`**. @@ -34,9 +35,9 @@ Query analysis helps users understand query execution mechanisms and identify pe -## EXPLAIN Statement +## 1. EXPLAIN Statement -### Syntax +### 1.1 Syntax The `EXPLAIN` command allows users to view the execution plan of an SQL query. It presents the plan as a series of operators, illustrating how IoTDB processes the query. The syntax is as follows, where `` represents the target query: @@ -44,7 +45,7 @@ The `EXPLAIN` command allows users to view the execution plan of an SQL query. I EXPLAIN ``` -### Description +### 1.2 Description The result of `EXPLAIN` includes information such as data access strategies, whether filtering conditions are pushed down, and the distribution of the query plan across different nodes. This provides users with a means to visualize the internal execution logic of the query. @@ -102,9 +103,9 @@ The result shows that IoTDB retrieves data from different data partitions throug +-----------------------------------------------------------------------------------------------+ ``` -## EXPLAIN ANALYZE Statement +## 2. EXPLAIN ANALYZE Statement -### Syntax +### 2.1 Syntax The `EXPLAIN ANALYZE` statement provides detailed performance metrics by executing the query and analyzing its runtime behavior. The syntax is as follows: @@ -115,7 +116,7 @@ EXPLAIN ANALYZE [VERBOSE] - `SELECT_STATEMENT` corresponds to the query statement to be analyzed. - `VERBOSE` (optional): Prints detailed analysis results. Without this option, some metrics are omitted. -### Description +### 2.2 Description `Explain Analyze` is a performance analysis SQL built into the IoTDB query engine. Unlike `Explain`, it runs the query and collects execution metrics, enabling users to trace performance bottlenecks, observe resource usage, and conduct precise performance tuning. @@ -123,7 +124,7 @@ The output includes detailed statistics such as query planning time, execution t ![](/img/explain-analyze-1.png) -### Detailed Breakdown of EXPLAIN ANALYZE Results +### 2.3 Detailed Breakdown of EXPLAIN ANALYZE Results #### QueryStatistics @@ -190,7 +191,7 @@ Chunks are the fundamental units of data storage in TsFiles. - loadChunkFromDiskCount: Number of times Chunks were read from disk. - loadChunkActualIOSize: Disk I/O used when reading Chunks (in bytes). -### Special Notes +### 2.4 Special Notes **Query** **Timeout Scenario with EXPLAIN ANALYZE** @@ -199,7 +200,7 @@ Since `EXPLAIN ANALYZE` runs as a special query type, it cannot return results i - The logging interval is dynamically calculated based on the query's timeout duration, ensuring at least two log entries before the timeout occurs. - Users can examine the log file to identify potential causes of the timeout. -### Example +### 2.5 Example The following example demonstrates how to use `EXPLAIN ANALYZE`: @@ -324,7 +325,7 @@ EXPLAIN ANALYZE VERBOSE SELECT * FROM t1; +-----------------------------------------------------------------------------------------------+ ``` -### FAQs +### 2.6 FAQs #### Differences Between WALL TIME and CPU TIME diff --git a/src/UserGuide/Master/Table/User-Manual/Tiered-Storage_timecho.md b/src/UserGuide/Master/Table/User-Manual/Tiered-Storage_timecho.md index 406798d64..587d87d2e 100644 --- a/src/UserGuide/Master/Table/User-Manual/Tiered-Storage_timecho.md +++ b/src/UserGuide/Master/Table/User-Manual/Tiered-Storage_timecho.md @@ -18,14 +18,15 @@ under the License. --> +# Tiered Storage -## Overview +## 1. Overview The **tiered storage** feature enables users to manage multiple types of storage media efficiently. Users can configure different storage media types within IoTDB and classify them into distinct storage tiers. In IoTDB, tiered storage is implemented by managing multiple directories. Users can group multiple storage directories into the same category and designate them as a **storage tier**. Additionally, data can be classified based on its "hotness" or "coldness" and stored accordingly in designated tiers. Currently, IoTDB supports hot and cold data classification based on the **Time-To-Live (****TTL****)** parameter. When data in a tier no longer meets the defined TTL rules, it is automatically migrated to the next tier. -## **Parameter Definitions** +## 2. **Parameter Definitions** To enable multi-level storage in IoTDB, the following configurations are required: @@ -49,7 +50,7 @@ The specific parameter definitions and their descriptions are as follows. | `remote_tsfile_cache_page_size_in_kb` | `20480` | Page size (in KB) for cloud storage local cache. | Required only if cloud storage is used. | | `remote_tsfile_cache_max_disk_usage_in_mb` | `51200` | Maximum disk space (in MB) allocated for cloud storage local cache. | Required only if cloud storage is used. | -## Local Tiered Storage Example +## 3. Local Tiered Storage Example The following is an example of a **two-tier local storage configuration**: @@ -67,7 +68,7 @@ dn_default_space_usage_thresholds=0.2;0.1 | Tier 1 | `/data1/data` | Last 1 day of data | 20% | | Tier 2 | `/data2/data`, `/data3/data` | Data older than 1 day | 10% | -## Cloud-based Tiered Storage Example +## 4. Cloud-based Tiered Storage Example The following is an example of a **three-tier configuration with cloud storage**: diff --git a/src/UserGuide/latest-Table/API/Programming-JDBC_timecho.md b/src/UserGuide/latest-Table/API/Programming-JDBC_timecho.md index 8779ec5f8..574b13826 100644 --- a/src/UserGuide/latest-Table/API/Programming-JDBC_timecho.md +++ b/src/UserGuide/latest-Table/API/Programming-JDBC_timecho.md @@ -18,19 +18,20 @@ under the License. --> +# JDBC The IoTDB JDBC provides a standardized way to interact with the IoTDB database, allowing users to execute SQL statements from Java programs for managing databases and time-series data. It supports operations such as connecting to the database, creating, querying, updating, and deleting data, as well as batch insertion and querying of time-series data. **Note:** The current JDBC implementation is designed primarily for integration with third-party tools. High-performance writing **may not be achieved** when using JDBC for insert operations. For Java applications, it is recommended to use the **JAVA Native API** for optimal performance. -## Prerequisites +## 1. Prerequisites -### **Environment Requirements** +### 1.1 **Environment Requirements** - **JDK:** Version 1.8 or higher - **Maven:** Version 3.6 or higher -### **Adding Maven Dependencies** +### 1.2 **Adding Maven Dependencies** Add the following dependency to your Maven `pom.xml` file: @@ -44,13 +45,13 @@ Add the following dependency to your Maven `pom.xml` file: ``` -## Read and Write Operations +## 2. Read and Write Operations **Write Operations:** Perform database operations such as inserting data, creating databases, and creating time-series using the `execute` method. **Read Operations:** Execute queries using the `executeQuery` method and retrieve results via the `ResultSet` object. -### Method Overview +### 2.1 Method Overview | **Method Name** | **Description** | **Parameters** | **Return Value** | | ------------------------------------------------------------ | ----------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------- | @@ -63,7 +64,7 @@ Add the following dependency to your Maven `pom.xml` file: | ResultSet.next() | Moves to the next row in the result set | None | `boolean`: Whether the move was successful | | ResultSet.getString(int columnIndex) | Retrieves the string value of a specified column | `columnIndex`: Column index (starting from 1) | `String`: Column value | -## Sample Code +## 3. Sample Code **Note:** When using the Table Model, you must specify the `sql_dialect` parameter as `table` in the URL. Example: diff --git a/src/UserGuide/latest-Table/API/Programming-Java-Native-API_timecho.md b/src/UserGuide/latest-Table/API/Programming-Java-Native-API_timecho.md index c97f50769..6fbd64539 100644 --- a/src/UserGuide/latest-Table/API/Programming-Java-Native-API_timecho.md +++ b/src/UserGuide/latest-Table/API/Programming-Java-Native-API_timecho.md @@ -18,17 +18,18 @@ under the License. --> +# Java Native API IoTDB provides a Java native client driver and a session pool management mechanism. These tools enable developers to interact with IoTDB using object-oriented APIs, allowing time-series objects to be directly assembled and inserted into the database without constructing SQL statements. It is recommended to use the `ITableSessionPool` for multi-threaded database operations to maximize efficiency. -## Prerequisites +## 1. Prerequisites -### Environment Requirements +### 1.1 Environment Requirements - **JDK**: Version 1.8 or higher - **Maven**: Version 3.6 or higher -### Adding Maven Dependencies +### 1.2 Adding Maven Dependencies ```XML @@ -40,9 +41,9 @@ IoTDB provides a Java native client driver and a session pool management mechani ``` -## Read and Write Operations +## 2. Read and Write Operations -### ITableSession Interface +### 2.1 ITableSession Interface The `ITableSession` interface defines basic operations for interacting with IoTDB, including data insertion, query execution, and session closure. Note that this interface is **not thread-safe**. @@ -124,7 +125,7 @@ public interface ITableSession extends AutoCloseable { } ``` -### TableSessionBuilder Class +### 2.2 TableSessionBuilder Class The `TableSessionBuilder` class is a builder for configuring and creating instances of the `ITableSession` interface. It allows developers to set connection parameters, query parameters, and security features. @@ -336,9 +337,9 @@ public class TableSessionBuilder { } ``` -## Session Pool +## 3. Session Pool -### ITableSessionPool Interface +### 3.1 ITableSessionPool Interface The `ITableSessionPool` interface manages a pool of `ITableSession` instances, enabling efficient reuse of connections and proper cleanup of resources. @@ -378,7 +379,7 @@ public interface ITableSessionPool { } ``` -### TableSessionPoolBuilder Class +### 3.2 ableSessionPoolBuilder Class The `TableSessionPoolBuilder` class is a builder for configuring and creating `ITableSessionPool` instances, supporting options like connection settings and pooling behavior. diff --git a/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md b/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md index 5ed77d6da..e2a9aaa62 100644 --- a/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md +++ b/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md @@ -18,10 +18,11 @@ under the License. --> +# Python Native API IoTDB provides a Python native client driver and a session pool management mechanism. These tools allow developers to interact with IoTDB in a programmatic and efficient manner. Using the Python API, developers can encapsulate time-series data into objects (e.g., `Tablet`, `NumpyTablet`) and insert them into the database directly, without the need to manually construct SQL statements. For multi-threaded operations, the `TableSessionPool` is recommended to optimize resource utilization and enhance performance. -## Prerequisites +## 1. Prerequisites To use the IoTDB Python API, install the required package using pip: @@ -29,9 +30,9 @@ To use the IoTDB Python API, install the required package using pip: pip3 install apache-iotdb ``` -## Read and Write Operations +## 2. Read and Write Operations -### TableSession +### 2.1 TableSession `TableSession` is a core class in IoTDB, enabling users to interact with the IoTDB database. It provides methods to execute SQL statements, insert data, and manage database sessions. @@ -101,7 +102,7 @@ def close(self): pass ``` -### TableSessionConfig +### 2.2 TableSessionConfig `TableSessionConfig` is a configuration class that sets parameters for creating a `TableSession` instance, defining essential settings for connecting to the IoTDB database. @@ -159,9 +160,9 @@ class TableSessionConfig(object): **Note:** After using a `TableSession`, make sure to call the `close` method to release resources. -## Session Pool +## 3. Session Pool -### TableSessionPool +### 3.1 TableSessionPool `TableSessionPool` is a session pool management class designed for creating and managing `TableSession` instances. It provides functionality to retrieve sessions from the pool and close the pool when it is no longer needed. @@ -200,7 +201,7 @@ def close(self): """ ``` -### TableSessionPoolConfig +### 3.2 TableSessionPoolConfig `TableSessionPoolConfig` is a configuration class used to define parameters for initializing and managing a `TableSessionPool` instance. It specifies the settings needed for efficient session pool management in IoTDB. @@ -276,7 +277,7 @@ class TableSessionPoolConfig(object): - Ensure that `TableSession` instances retrieved from the `TableSessionPool` are properly closed after use. - After closing the `TableSessionPool`, it will no longer be possible to retrieve new sessions. -## Sample Code +## 4. Sample Code **Session** Example: You can find the full example code at [GitHub Repository](https://github.com/apache/iotdb/blob/master/iotdb-client/client-py/table_model_session_example.py). diff --git a/src/UserGuide/latest-Table/API/RestAPI-V1.md b/src/UserGuide/latest-Table/API/RestAPI-V1.md index 77983bbf3..d4224bc35 100644 --- a/src/UserGuide/latest-Table/API/RestAPI-V1.md +++ b/src/UserGuide/latest-Table/API/RestAPI-V1.md @@ -18,10 +18,11 @@ under the License. --> +# RestAPI V1 IoTDB's RESTful service can be used for querying, writing, and management operations. It uses the OpenAPI standard to define interfaces and generate frameworks. -### Enabling RESTful Service +## 1. Enabling RESTful Service The RESTful service is disabled by default. To enable it, locate the `conf/iotdb-system.properties` file in the IoTDB installation directory, set `enable_rest_service` to `true`, and then restart the datanode process. @@ -29,7 +30,7 @@ The RESTful service is disabled by default. To enable it, locate the `conf/iotdb enable_rest_service=true ``` -### Authentication +## 2. Authentication Except for the health check endpoint `/ping`, the RESTful service uses basic authentication. Each URL request must include the header `'Authorization':'Basic' + base64.encode(username + ':' + password)`. @@ -59,9 +60,9 @@ Authorization : Basic cm9vdDpyb290 {"code":800,"message":"INIT_AUTH_ERROR"} ``` -### Interface Definitions +## 3. Interface Definitions -#### Ping +### 3.1 Ping The `/ping` endpoint can be used for online service health checks. @@ -71,9 +72,9 @@ The `/ping` endpoint can be used for online service health checks. - Example Request: - ```Shell + ```Bash curl http://127.0.0.1:18080/ping - ``` + ``` - HTTP Status Codes: @@ -102,7 +103,7 @@ The `/ping` endpoint can be used for online service health checks. **Note**: The `/ping` endpoint does not require authentication. -#### Query Interface +### 3.2 Query Interface - Request Path: `/rest/table/v1/query` @@ -130,9 +131,9 @@ The `/ping` endpoint can be used for online service health checks. - Example Request: - ```JSON + ```Bash curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X POST --data '{"database":"test","sql":"select s1,s2,s3 from test_table"}' http://127.0.0.1:18080/rest/table/v1/query - ``` + ``` - Example Response: @@ -161,9 +162,9 @@ The `/ping` endpoint can be used for online service health checks. ] ] } - ``` + ``` -#### Non-Query Interface +### 3.3 Non-Query Interface - Request Path: `/rest/table/v1/nonQuery` @@ -208,9 +209,9 @@ The `/ping` endpoint can be used for online service health checks. "code": 200, "message": "SUCCESS_STATUS" } - ``` + ``` -#### Batch Write Interface +### 3.4 Batch Write Interface - Request Path: `/rest/table/v1/insertTablet` @@ -241,9 +242,9 @@ The `/ping` endpoint can be used for online service health checks. - Example Request: - ```JSON + ```Bash curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X POST --data '{"database":"test","column_catogories":["TAG","FIELD","FIELD"],"timestamps":[1739702535000,1739789055000],"column_names":["s1","s2","s3"],"data_types":["STRING","BOOLEAN","INT32"],"values":[["a11",true,2024],["a11",false,2025]],"table":"test_table"}' http://127.0.0.1:18080/rest/table/v1/insertTablet - ``` + ``` - Example Response: @@ -252,86 +253,86 @@ The `/ping` endpoint can be used for online service health checks. "code": 200, "message": "SUCCESS_STATUS" } - ``` + ``` -### Configuration +## 4. Configuration The configuration file is located in `iotdb-system.properties`. - Set `enable_rest_service` to `true` to enable the module, or `false` to disable it. The default value is `false`. - ```Plain + ```Properties enable_rest_service=true - ``` + ``` - Only effective when `enable_rest_service=true`. Set `rest_service_port` to a number (1025~65535) to customize the REST service socket port. The default value is `18080`. - ```Plain + ```Properties rest_service_port=18080 - ``` + ``` - Set `enable_swagger` to `true` to enable Swagger for displaying REST interface information, or `false` to disable it. The default value is `false`. - ```Plain + ```Properties enable_swagger=false - ``` + ``` - The maximum number of rows that can be returned in a single query. If the result set exceeds this limit, only the rows within the limit will be returned, and status code `411` will be returned. - ```Plain + ```Properties rest_query_default_row_size_limit=10000 - ``` + ``` - Expiration time for caching client login information (used to speed up user authentication, in seconds, default is 8 hours). - ```Plain + ```Properties cache_expire_in_seconds=28800 - ``` + ``` - Maximum number of users stored in the cache (default is 100). - ```Plain + ```Properties cache_max_num=100 - ``` + ``` - Initial cache capacity (default is 10). - ```Plain + ```Properties cache_init_num=10 - ``` + ``` - Whether to enable SSL configuration for the REST service. Set `enable_https` to `true` to enable it, or `false` to disable it. The default value is `false`. - ```Plain + ```Properties enable_https=false - ``` + ``` - Path to the `keyStore` (optional). - ```Plain + ```Properties key_store_path= - ``` + ``` - Password for the `keyStore` (optional). - ```Plain + ```Properties key_store_pwd= - ``` + ``` - Path to the `trustStore` (optional). - ```Plain + ```Properties trust_store_path="" - ``` + ``` - Password for the `trustStore` (optional). - ```Plain + ```Properties trust_store_pwd="" - ``` + ``` - SSL timeout time, in seconds. - ```Plain + ```Properties idle_timeout_in_seconds=5000 - ``` \ No newline at end of file + ``` \ No newline at end of file diff --git a/src/UserGuide/latest-Table/Background-knowledge/Cluster-Concept_apache.md b/src/UserGuide/latest-Table/Background-knowledge/Cluster-Concept_apache.md index e6fec93e8..b61ac6f7a 100644 --- a/src/UserGuide/latest-Table/Background-knowledge/Cluster-Concept_apache.md +++ b/src/UserGuide/latest-Table/Background-knowledge/Cluster-Concept_apache.md @@ -21,9 +21,9 @@ # Common Concept -## SQL Dialect Related Concepts +## 1. SQL Dialect Related Concepts -### sql_dialect +### 1.1 sql_dialect IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points: @@ -32,34 +32,34 @@ IoTDB supports two time-series data models (SQL dialects), both managing devices Each dialect comes with its own SQL syntax and query patterns tailored to its data model. -### Schema +### 1.2 Schema Schema refers to the metadata structure of the database, which can follow either a tree or table format. It includes definitions such as measurement point names, data types, and storage configurations. -### Device +### 1.3 Device A device corresponds to a physical device in a real-world scenario, typically associated with multiple measurement points. -### Timeseries +### 1.4 Timeseries Also referred to as: physical quantity, time series, timeline, point, signal, metric, measurement value, etc. A measurement point is a time series consisting of multiple data points arranged in ascending timestamp order. It typically represents a collection point that periodically gathers physical quantities from its environment. -### Encoding +### 1.5 Encoding Encoding is a compression technique that represents data in binary form, improving storage efficiency. IoTDB supports multiple encoding methods for different types of data. For details, refer to: [Compression and Encoding ](../Technical-Insider/Encoding-and-Compression.md)。 -### Compression +### 1.6 Compression After encoding, IoTDB applies additional compression techniques to further reduce data size and improve storage efficiency. Various compression algorithms are supported. For details, refer to: [ Compression and Encoding](../Technical-Insider/Encoding-and-Compression.md)。 -## Distributed System Related Concepts +## 2. Distributed System Related Concepts IoTDB supports distributed deployments, typically in a 3C3D cluster model (3 ConfigNodes, 3 DataNodes), as illustrated below: -### Key Concepts +### 2.1 Key Concepts - **Nodes** (*ConfigNode,* *DataNode**, AINode*) - **Regions** (*SchemaRegion, DataRegion*) @@ -67,7 +67,7 @@ IoTDB supports distributed deployments, typically in a 3C3D cluster model (3 Con Below is an introduction to these concepts. -### Nodes +### 2.2 Nodes An IoTDB cluster consists of three types of nodes, each with distinct responsibilities: @@ -75,7 +75,7 @@ An IoTDB cluster consists of three types of nodes, each with distinct responsibi - **DataNode (Storage and Computation Node)** Handles client requests, stores data, and executes computations. - **AINode (Analytics Node)** Provides machine learning capabilities, allowing users to register pre-trained models and perform inference via SQL. It includes built-in time-series models and common ML algorithms for tasks like prediction and anomaly detection. -### Data Partitioning +### 2.3 Data Partitioning IoTDB divides schema and data into **Regions**, which are managed by DataNodes. @@ -84,7 +84,7 @@ IoTDB divides schema and data into **Regions**, which are managed by DataNodes. For more details, see [Cluster Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) -### Replica Groups +### 2.4 Replica Groups Replica groups ensure high availability by maintaining multiple copies of schema and data. The recommended replication configurations are: @@ -94,11 +94,11 @@ Replica groups ensure high availability by maintaining multiple copies of schema | Data | data_replication_factor | 1 | 2 | -## Deployment Related Concepts +## 3. Deployment Related Concepts IoTDB has two operation modes: standalone mode and cluster mode. -### Standalone Mode +### 3.1 Standalone Mode An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, referred to as 1C1D. @@ -107,7 +107,7 @@ An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, referred to a - **Deployment method**:[Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) -### Cluster Mode +### 3.2 Cluster Mode An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNodes, typically 3 DataNodes, referred to as 3C3D. In the event of partial node failures, the remaining nodes can still provide services, ensuring high availability of the database service, and the database performance can be improved with the addition of nodes. @@ -115,7 +115,7 @@ An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNode - **Applicable scenarios**: Enterprise-level application scenarios that require high availability and reliability. - **Deployment method**: [Cluster Deployment](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) -### Summary of Features +### 3.3 Summary of Features | **Dimension** | **Stand-Alone Mode** | **Cluster Mode** | | :-------------------------- | :----------------------------------------------------- | :----------------------------------------------------------- | diff --git a/src/UserGuide/latest-Table/Background-knowledge/Cluster-Concept_timecho.md b/src/UserGuide/latest-Table/Background-knowledge/Cluster-Concept_timecho.md index 9229f35db..40ff6cca8 100644 --- a/src/UserGuide/latest-Table/Background-knowledge/Cluster-Concept_timecho.md +++ b/src/UserGuide/latest-Table/Background-knowledge/Cluster-Concept_timecho.md @@ -21,9 +21,9 @@ # Common Concept -## SQL Dialect Related Concepts +## 1. SQL Dialect Related Concepts -### sql_dialect +### 1.1 sql_dialect IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points: @@ -32,34 +32,34 @@ IoTDB supports two time-series data models (SQL dialects), both managing devices Each dialect comes with its own SQL syntax and query patterns tailored to its data model. -### Schema +### 1.2 Schema Schema refers to the metadata structure of the database, which can follow either a tree or table format. It includes definitions such as measurement point names, data types, and storage configurations. -### Device +### 1.3 Device A device corresponds to a physical device in a real-world scenario, typically associated with multiple measurement points. -### Timeseries +### 1.4 Timeseries Also referred to as: physical quantity, time series, timeline, point, signal, metric, measurement value, etc. A measurement point is a time series consisting of multiple data points arranged in ascending timestamp order. It typically represents a collection point that periodically gathers physical quantities from its environment. -### Encoding +### 1.5 Encoding Encoding is a compression technique that represents data in binary form, improving storage efficiency. IoTDB supports multiple encoding methods for different types of data. For details, refer to: [Compression and Encoding ](../Technical-Insider/Encoding-and-Compression.md)。 -### Compression +### 1.6 Compression After encoding, IoTDB applies additional compression techniques to further reduce data size and improve storage efficiency. Various compression algorithms are supported. For details, refer to: [ Compression and Encoding](../Technical-Insider/Encoding-and-Compression.md)。 -## Distributed System Related Concepts +## 2. Distributed System Related Concepts IoTDB supports distributed deployments, typically in a 3C3D cluster model (3 ConfigNodes, 3 DataNodes), as illustrated below: -### Key Concepts +### 2.1 Key Concepts - **Nodes** (*ConfigNode,* *DataNode**, AINode*) - **Regions** (*SchemaRegion, DataRegion*) @@ -68,7 +68,7 @@ IoTDB supports distributed deployments, typically in a 3C3D cluster model (3 Con Below is an introduction to these concepts. -### Nodes +### 2.2 Nodes An IoTDB cluster consists of three types of nodes, each with distinct responsibilities: @@ -76,7 +76,7 @@ An IoTDB cluster consists of three types of nodes, each with distinct responsibi - **DataNode (Storage and Computation Node)** Handles client requests, stores data, and executes computations. - **AINode (Analytics Node)** Provides machine learning capabilities, allowing users to register pre-trained models and perform inference via SQL. It includes built-in time-series models and common ML algorithms for tasks like prediction and anomaly detection. -### Data Partitioning +### 2.3 Data Partitioning IoTDB divides schema and data into **Regions**, which are managed by DataNodes. @@ -85,7 +85,7 @@ IoTDB divides schema and data into **Regions**, which are managed by DataNodes. For more details, see [Cluster Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) -### Replica Groups +### 2.4 Replica Groups Replica groups ensure high availability by maintaining multiple copies of schema and data. The recommended replication configurations are: @@ -95,11 +95,11 @@ Replica groups ensure high availability by maintaining multiple copies of schema | Data | data_replication_factor | 1 | 2 | -## Deployment Related Concepts +## 3. Deployment Related Concepts IoTDB has two operation modes: standalone mode and cluster mode. -### Standalone Mode +### 3.1 Standalone Mode An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D. @@ -108,7 +108,7 @@ An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D. - **Deployment Method**: [Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) -### Dual-Active Mode +### 3.2 Dual-Active Mode Dual-Active Deployment is a feature of TimechoDB, where two independent instances synchronize bidirectionally and can provide services simultaneously. If one instance stops and restarts, the other instance will resume data transfer from the breakpoint. @@ -118,7 +118,7 @@ Dual-Active Deployment is a feature of TimechoDB, where two independent instance - **Use Cases**: Scenarios with limited resources (only two servers) but requiring high availability. - **Deployment Method**: [Dual-Active Deployment](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) -### Cluster Mode +### 3.3 Cluster Mode An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNodes, typically 3 DataNodes, i.e., 3C3D. If some nodes fail, the remaining nodes can still provide services, ensuring high availability of the database. Performance can be improved by adding DataNodes. @@ -127,7 +127,7 @@ An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNode - **Deployment Method**: [Cluster Deployment](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md) -### Feature Summary +### 3.4 Feature Summary | **Dimension** | **Stand-Alone Mode** | **Dual-Active Mode** | **Cluster Mode** | | :-------------------------- | :------------------------------------------------------- | :------------------------------------------------------ | :------------------------------------------------------ | diff --git a/src/UserGuide/latest-Table/Background-knowledge/Data-Model-and-Terminology_apache.md b/src/UserGuide/latest-Table/Background-knowledge/Data-Model-and-Terminology_apache.md index 2bec26da1..f3b777bf2 100644 --- a/src/UserGuide/latest-Table/Background-knowledge/Data-Model-and-Terminology_apache.md +++ b/src/UserGuide/latest-Table/Background-knowledge/Data-Model-and-Terminology_apache.md @@ -23,11 +23,11 @@ This section introduces how to transform time series data application scenarios into IoTDB time series modeling. -## 1 Time Series Data Model +## 1. Time Series Data Model Before designing an IoTDB data model, it's essential to understand time series data and its underlying structure. For more details, refer to: [Time Series Data Model](../Background-knowledge/Navigating_Time_Series_Data.md) -## 2 Two Time Series Model in IoTDB +## 2. Two Time Series Model in IoTDB IoTDB offers two data modeling syntaxes—tree model and table model, each with its distinct characteristics as follows: @@ -80,7 +80,7 @@ The following table compares the tree model and the table model from various dim - When establishing a database connection via client tools (Cli) or SDKs, specify the model syntax using the `sql_dialect` parameter (Tree syntax is used by default). -## 3 Application Scenarios +## 3. Application Scenarios The application scenarios mainly include two categories: diff --git a/src/UserGuide/latest-Table/Background-knowledge/Data-Model-and-Terminology_timecho.md b/src/UserGuide/latest-Table/Background-knowledge/Data-Model-and-Terminology_timecho.md index 0e843c871..477666573 100644 --- a/src/UserGuide/latest-Table/Background-knowledge/Data-Model-and-Terminology_timecho.md +++ b/src/UserGuide/latest-Table/Background-knowledge/Data-Model-and-Terminology_timecho.md @@ -23,11 +23,11 @@ This section introduces how to transform time series data application scenarios into IoTDB time series modeling. -## 1 Time Series Data Model +## 1. Time Series Data Model Before designing an IoTDB data model, it's essential to understand time series data and its underlying structure. For more details, refer to: [Time Series Data Model](../Background-knowledge/Navigating_Time_Series_Data.md) -## 2 Two Time Series Model in IoTDB +## 2. Two Time Series Model in IoTDB IoTDB offers two data modeling syntaxes—tree model and table model, each with its distinct characteristics as follows: @@ -80,7 +80,7 @@ The following table compares the tree model and the table model from various dim - When establishing a database connection via client tools (Cli) or SDKs, specify the model syntax using the `sql_dialect` parameter (Tree syntax is used by default). -## 3 Application Scenarios +## 3. Application Scenarios The application scenarios mainly include three categories: diff --git a/src/UserGuide/latest-Table/Background-knowledge/Data-Type.md b/src/UserGuide/latest-Table/Background-knowledge/Data-Type.md index 179caa45d..34219dad3 100644 --- a/src/UserGuide/latest-Table/Background-knowledge/Data-Type.md +++ b/src/UserGuide/latest-Table/Background-knowledge/Data-Type.md @@ -21,7 +21,7 @@ # Data Types -## 1 Basic Data Types +## 1. Basic Data Types IoTDB supports the following ten data types: @@ -75,7 +75,7 @@ The compatibility of data types is shown in the table below: | TIMESTAMP | INT32, INT64, TIMESTAMP | | DATE | DATE | -## 2 Timestamp Types +## 2. Timestamp Types A timestamp represents the moment when data is recorded. IoTDB supports two types: diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Cluster-Deployment_apache.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Cluster-Deployment_apache.md index 0214e7996..2a8d7c6cf 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Cluster-Deployment_apache.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Cluster-Deployment_apache.md @@ -27,7 +27,7 @@ This guide describes how to manually deploy a cluster instance consisting of 3 C -## 1 Prerequisites +## 1. Prerequisites 1. **System Preparation**: Ensure the system has been configured according to the [System Requirements](../Deployment-and-Maintenance/Environment-Requirements.md). @@ -51,14 +51,14 @@ Use the hostname for `cn_internal_address` and `dn_internal_address` in IoTDB co 6. **Monitoring Panel**: Deploy a monitoring panel to track key performance metrics. Contact the Timecho team for access and refer to the [Monitoring Board Install and Deploy](../Deployment-and-Maintenance/Monitoring-panel-deployment.md). -## 2 Preparation +## 2. Preparation 1. Prepare the IoTDB database installation package::apache-iotdb-{version}-all-bin.zip(Please refer to the installation package for details:[IoTDB-Package](../Deployment-and-Maintenance/IoTDB-Package_apache.md)) 2. Configure the operating system environment according to environmental requirements (system environment configuration can be found in:[Environment Requirement](../Deployment-and-Maintenance/Environment-Requirements.md)) -## 3 Installation Steps +## 3. Installation Steps Taking a cluster with three Linux servers with the following information as example: @@ -161,7 +161,7 @@ On each server, navigate to the `sbin` directory and start the DataNode: Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database has been successfully activated. -## 4 Maintenance +## 4. Maintenance ### 4.1 ConfigNode Maintenance @@ -289,7 +289,7 @@ sbin/remove-datanode.sh [dn_rpc_address:dn_rpc_port] sbin/remove-datanode.bat [dn_rpc_address:dn_rpc_port] ``` -## 5 Common Issues +## 5. Common Issues 1. ConfigNode Fails to Start 1. Review the startup logs to check if any parameters, which cannot be modified after the first startup, were changed. @@ -324,7 +324,7 @@ sbin/remove-datanode.bat [dn_rpc_address:dn_rpc_port] rm -rf data logs ``` -## 6 Appendix +## 6. Appendix ### 6.1 ConfigNode Parameters diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Cluster-Deployment_timecho.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Cluster-Deployment_timecho.md index 306420109..f039b0fca 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Cluster-Deployment_timecho.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Cluster-Deployment_timecho.md @@ -27,7 +27,7 @@ This guide describes how to manually deploy a cluster instance consisting of 3 C -## 1 Prerequisites +## 1. Prerequisites 1. **System Preparation**: Ensure the system has been configured according to the [System Requirements](../Deployment-and-Maintenance/Environment-Requirements.md). @@ -51,13 +51,13 @@ Use the hostname for `cn_internal_address` and `dn_internal_address` in IoTDB co 6. **Monitoring Panel**: Deploy a monitoring panel to track key performance metrics. Contact the Timecho team for access and refer to the [Monitoring Board Install and Deploy](../Deployment-and-Maintenance/Monitoring-panel-deployment.md). -## 2 Preparation +## 2. Preparation 1. Obtain the TimechoDB installation package: `timechodb-{version}-bin.zip` following [IoTDB-Package](../Deployment-and-Maintenance/IoTDB-Package_timecho.md)) 2. Configure the operating system environment according to [Environment Requirement](../Deployment-and-Maintenance/Environment-Requirements.md)) -## 3 Installation Steps +## 3. Installation Steps Taking a cluster with three Linux servers with the following information as example: @@ -217,7 +217,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database ![](/img/%E9%9B%86%E7%BE%A4-%E9%AA%8C%E8%AF%81.png) -## 4 Maintenance +## 4. Maintenance ### 4.1 ConfigNode Maintenance @@ -345,7 +345,7 @@ sbin/remove-datanode.sh [dn_rpc_address:dn_rpc_port] sbin/remove-datanode.bat [dn_rpc_address:dn_rpc_port] ``` -## 5 Common Issues +## 5. Common Issues 1. Activation Fails Repeatedly - Use the `ls -al` command to verify that the ownership of the installation directory matches the current user. @@ -384,7 +384,7 @@ sbin/remove-datanode.bat [dn_rpc_address:dn_rpc_port] rm -rf data logs ``` -## 6 Appendix +## 6. Appendix ### 6.1 ConfigNode Parameters diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Database-Resources.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Database-Resources.md index 2ca497e6e..0d0f3a851 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Database-Resources.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Database-Resources.md @@ -19,7 +19,7 @@ --> # Database Resources -## 1 CPU +## 1. CPU @@ -81,7 +81,7 @@
-## 2 Memory +## 2. Memory @@ -143,7 +143,7 @@
-## 3 Storage (Disk) +## 3. Storage (Disk) ### 3.1 Storage space Calculation Formula: @@ -203,7 +203,7 @@ Example: - For systems with > 10 million measurement points or high query loads, SSD is recommended. -## 4 Network (NIC) +## 4. Network (NIC) When the write throughput does not exceed 10 million points per second, a gigabit network card is required. When the write throughput exceeds 10 million points per second, a 10-gigabit network card is required. | **Write** **Throughput** **(Data Points/Second)** | **NIC** **Speed** | @@ -211,6 +211,6 @@ When the write throughput does not exceed 10 million points per second, a gigabi | < 10 million | 1 Gbps (Gigabit) | | ≥ 10 million | 10 Gbps (10 Gigabit) | -## 5 Additional Notes +## 5. Additional Notes - IoTDB supports second-level cluster scaling . Data migration is not required when adding new nodes, so there is no need to worry about limited cluster capacity based on current data estimates. You can add new nodes to the cluster when scaling is needed in the future. \ No newline at end of file diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Deployment-form_apache.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Deployment-form_apache.md index a934884cb..eec5edf92 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Deployment-form_apache.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Deployment-form_apache.md @@ -22,7 +22,7 @@ IoTDB has two operation modes: standalone mode and cluster mode. -## 1 Standalone Mode +## 1. Standalone Mode An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, referred to as 1C1D. @@ -31,7 +31,7 @@ An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, referred to a - **Deployment method**:[Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) -## 2 Cluster Mode +## 2. Cluster Mode An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNodes, typically 3 DataNodes, referred to as 3C3D. In the event of partial node failures, the remaining nodes can still provide services, ensuring high availability of the database service, and the database performance can be improved with the addition of nodes. @@ -39,7 +39,7 @@ An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNode - **Applicable scenarios**: Enterprise-level application scenarios that require high availability and reliability. - **Deployment method**: [Cluster Deployment](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) -## 3 Summary of Features +## 3. Summary of Features | **Dimension** | **Stand-Alone Mode** | **Cluster Mode** | | :-------------------------- | :----------------------------------------------------- | :----------------------------------------------------------- | diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Deployment-form_timecho.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Deployment-form_timecho.md index c757e9561..b2daee47f 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Deployment-form_timecho.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Deployment-form_timecho.md @@ -22,7 +22,7 @@ IoTDB has two operation modes: standalone mode and cluster mode. -## 1 Standalone Mode +## 1. Standalone Mode An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D. @@ -30,7 +30,7 @@ An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D. - **Use Cases**: Scenarios with limited resources or low high-availability requirements, such as edge servers. - **Deployment Method**: [Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) -## 2 Dual-Active Mode +## 2. Dual-Active Mode Dual-Active Deployment is a feature of TimechoDB, where two independent instances synchronize bidirectionally and can provide services simultaneously. If one instance stops and restarts, the other instance will resume data transfer from the breakpoint. @@ -40,7 +40,7 @@ Dual-Active Deployment is a feature of TimechoDB, where two independent instance - **Use Cases**: Scenarios with limited resources (only two servers) but requiring high availability. - **Deployment Method**: [Dual-Active Deployment](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) -## 3 Cluster Mode +## 3. Cluster Mode An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNodes, typically 3 DataNodes, i.e., 3C3D. If some nodes fail, the remaining nodes can still provide services, ensuring high availability of the database. Performance can be improved by adding DataNodes. @@ -50,7 +50,7 @@ An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNode -## 4 Feature Summary +## 4. Feature Summary | **Dimension** | **Stand-Alone Mode** | **Dual-Active Mode** | **Cluster Mode** | | :-------------------------- | :------------------------------------------------------- | :------------------------------------------------------ | :------------------------------------------------------ | diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Docker-Deployment_apache.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Docker-Deployment_apache.md index 176db37f8..38c3feb95 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Docker-Deployment_apache.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Docker-Deployment_apache.md @@ -20,7 +20,7 @@ --> # Docker Deployment -## 1 Environment Preparation +## 1. Environment Preparation ### 1.1 Install Docker @@ -53,12 +53,12 @@ ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose docker-compose --version #Display version information, indicating successful installation. ``` -## 2 Stand-Alone Deployment +## 2. Stand-Alone Deployment This section demonstrates how to deploy a standalone Docker version of 1C1D. -### Pull Image File +### 2.1 Pull Image File The Docker image of Apache IoTDB has been uploaded tohttps://hub.docker.com/r/apache/iotdb。 @@ -201,7 +201,7 @@ docker cp iotdb:/iotdb/conf /docker-iotdb/iotdb/conf docker-compose -f docker-compose-standalone.yml up -d ``` -## 3 Cluster Deployment +## 3. Cluster Deployment This section describes how to manually deploy a cluster consisting of 3 ConfigNodes and 3 DataNodes, commonly referred to as a 3C3D cluster. diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Docker-Deployment_timecho.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Docker-Deployment_timecho.md index 608bc363c..858098632 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Docker-Deployment_timecho.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Docker-Deployment_timecho.md @@ -20,7 +20,7 @@ --> # Docker Deployment -## 1 Environment Preparation +## 1. Environment Preparation ### 1.1 Install Docker @@ -67,7 +67,7 @@ After installing `dmidecode`, you can locate its installation path by running:`w For the TimechoDB container image, you can contact the Timecho team to acquire it. -## 2 Stand-Alone Deployment +## 2. Stand-Alone Deployment This section demonstrates how to deploy a standalone Docker version of 1C1D. @@ -233,7 +233,7 @@ docker cp iotdb:/iotdb/conf /docker-iotdb/iotdb/conf docker-compose -f docker-compose-standalone.yml up -d ``` -## 3 Cluster Deployment +## 3. Cluster Deployment This section describes how to manually deploy a cluster consisting of 3 ConfigNodes and 3 DataNodes, commonly referred to as a 3C3D cluster. diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md index e6cb33081..cf1dee5d8 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md @@ -20,7 +20,7 @@ --> # Dual Active Deployment -## What is a double active version? +## 1. What is a double active version? Dual-active mode refers to two independent instances (either standalone or clusters) with completely independent configurations. These instances can simultaneously handle external read and write operations, with real-time bi-directional synchronization and breakpoint recovery capabilities. @@ -33,7 +33,7 @@ Key features include: ![](/img/20240731104336.png) -## Prerequisites +## 2. Prerequisites 1. **Hostname Configuration**: It is recommended to prioritize hostname over IP during deployment to avoid issues where the database cannot start due to later changes in the host IP. For instance, if the local IP is `192.168.1.3` and the hostname is `iotdb-1`, configure it in `/etc/hosts` using: @@ -47,7 +47,7 @@ Use the hostname to configure IoTDB’s `cn_internal_address` and `dn_internal_a 3. **Monitoring Panel**: Deploying a monitoring panel is recommended to monitor key performance indicators and stay informed about the database’s operational status. Contact the Timecho team to obtain the monitoring panel and refer to the corresponding [Monitoring Panel Deployment](../Deployment-and-Maintenance/Monitoring-panel-deployment.md) for deployment steps. -## 3 Installation Steps +## 3. Installation Steps This guide uses two standalone nodes, A and B, to deploy the dual-active version of TimechoDB. The IP addresses and hostnames for the nodes are as follows: @@ -56,13 +56,13 @@ This guide uses two standalone nodes, A and B, to deploy the dual-active version | A | 192.168.1.3 | iotdb-1 | | B | 192.168.1.4 | iotdb-2 | -### Step1:Install Two Independent TimechoDB Instances +### 3.1 Install Two Independent TimechoDB Instances Install TimechoDB on both machines (A and B) independently. For detailed instructions, refer to the standalone [Stand-Alone Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md)or cluster [Cluster Deployment](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md)deployment guides. Ensure that configurations for A and B are consistent for optimal dual-active performance. -### Step2:Configure Data Synchronization from Machine A to Machine B +### 3.2 Configure Data Synchronization from Machine A to Machine B - Connect to the database on Machine A using the CLI tool from the `sbin` directory: @@ -85,7 +85,7 @@ with sink ( - **Note:** To avoid infinite data loops, ensure the parameter `source.mode.double-living` is set to `true` on both A and B. This prevents retransmission of data received through the other instance's pipe. -### Step3:Configure Data Synchronization from Machine B to Machine A +### 3.3 Configure Data Synchronization from Machine B to Machine A - Connect to the database on Machine B: @@ -109,7 +109,7 @@ with sink ( - **Note:** To avoid infinite data loops, ensure the parameter `source.mode.double-living` is set to `true` on both A and B. This prevents retransmission of data received through the other instance's pipe. -### Step4:Verify Deployment +### 3.4 Verify Deployment #### Check Cluster Status @@ -147,7 +147,7 @@ On machine B: ![](/img/show%20pipes-B.png) -### Step5:Stop the Dual-Active Instances +### 3.5 Stop the Dual-Active Instances To stop the dual-active instances: diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Environment-Requirements.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Environment-Requirements.md index a1a168b86..dd2f1e26a 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Environment-Requirements.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Environment-Requirements.md @@ -20,7 +20,7 @@ --> # System Requirements -## 1 Disk Array +## 1. Disk Array ### 1.1 Configuration Suggestions @@ -76,7 +76,7 @@ IoTDB does not have strict operational requirements for disk array configuration | Data Disk | RAID5 | 7 | 1 disk failure allowed | 6 | | Data Disk | No RAID | 1 | Data loss if damaged | 1 | -## 2 Operating System +## 2. Operating System ### 2.1 Version Requirements @@ -184,7 +184,7 @@ Recommended disk partitioning is as follows: -## 3 Software Dependencies +## 3. Software Dependencies Install Java Runtime Environment, Java version >= 1.8. Ensure JDK environment variables are set. (For versions V1.3.2.2 and later, it is recommended to directly deploy JDK17. Older JDK versions may have performance issues in some scenarios, and DataNode may fail to stop.) diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/IoTDB-Package_apache.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/IoTDB-Package_apache.md index 4bf9b1e0f..e775c431f 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/IoTDB-Package_apache.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/IoTDB-Package_apache.md @@ -20,12 +20,12 @@ --> # Obtain IoTDB -## 1 How to obtain IoTDB +## 1. How to obtain IoTDB The installation package can be directly obtained from the Apache IoTDB official website:https://iotdb.apache.org/Download/ -## 2 Installation Package Structure +## 2. Installation Package Structure Install the package after decompression(`apache-iotdb--all-bin.zip`),After decompressing the installation package, the directory structure is as follows: diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/IoTDB-Package_timecho.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/IoTDB-Package_timecho.md index 261c8a10f..3c1742408 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/IoTDB-Package_timecho.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/IoTDB-Package_timecho.md @@ -20,11 +20,11 @@ --> # Obtain TimechoDB -## 1 How to obtain TimechoDB +## 1. How to obtain TimechoDB The TimechoDB installation package can be obtained through product trial application or by directly contacting the Timecho team. -## 2 Installation Package Structure +## 2. Installation Package Structure After unpacking the installation package(`iotdb-enterprise-{version}-bin.zip`),you will see the directory structure is as follows: diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Monitoring-panel-deployment.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Monitoring-panel-deployment.md index 9bd72b9fc..8cabc7278 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Monitoring-panel-deployment.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Monitoring-panel-deployment.md @@ -22,20 +22,15 @@ The monitoring panel is one of the supporting tools for TimechoDB. It aims to solve the monitoring problems of TimechoDB and its operating system, mainly including operating system resource monitoring, TimechoDB performance monitoring, and hundreds of kernel monitoring metrics, in order to help users monitor cluster health, optimize performance, and perform maintenance. This guide demonstrates how to enable the system monitoring module in a TimechoDB instance and visualize monitoring metrics using Prometheus + Grafana, using a typical 3C3D cluster (3 ConfigNodes and 3 DataNodes) as an example. -## Installation Preparation - -1. Installing IoTDB: You need to first install IoTDB V1.0 or above Enterprise Edition. You can contact business or technical support to obtain -2. Obtain the IoTDB monitoring panel installation package: Based on the enterprise version of IoTDB database monitoring panel, you can contact business or technical support to obtain - -## 1 Installation Preparation +## 1. Installation Preparation 1. Installing TimechoDB: Install TimechoDB V1.0 or above. Contact sales or technical support to obtain the installation package. 2. Obtain the monitoring panel installation package: The monitoring panel is exclusive to the enterprise-grade TimechoDB. Contact sales or technical support to obtain it. -## 2 Installation Steps +## 2. Installation Steps -### Step 1: Enable Monitoring Metrics Collection in TimechoDB +### 2.1 Enable Monitoring Metrics Collection in TimechoDB 1. Enable related configuration options. The configuration options related to monitoring in TimechoDB are disabled by default. Before deploying the monitoring panel, you need to enable certain configuration options (note that the service needs to be restarted after enabling monitoring configuration). @@ -71,7 +66,7 @@ Taking the 3C3D cluster as an example, the monitoring configuration that needs t ![](/img/%E5%90%AF%E5%8A%A8.png) -### Step 2: Install and Configure Prometheus +### 2.2 Install and Configure Prometheus > In this example, Prometheus is installed on server 192.168.1.3. @@ -122,7 +117,7 @@ scrape_configs: ![](/img/%E8%8A%82%E7%82%B9%E7%9B%91%E6%8E%A7.png) -### Step 3: Install Grafana and Configure the Data Source +### 2.3 Install Grafana and Configure the Data Source > n this example, Grafana is installed on server 192.168.1.3. @@ -151,7 +146,7 @@ Ensure the URL for Prometheus is correct. Click "Save & Test". If the message "D ![](/img/%E9%85%8D%E7%BD%AE%E6%88%90%E5%8A%9F.png) -### Step 4: Import IoTDB Grafana Dashboards +### 2.4 Import IoTDB Grafana Dashboards 1. Enter Grafana and select Dashboards: @@ -189,7 +184,7 @@ Ensure the URL for Prometheus is correct. Click "Save & Test". If the message "D ![](/img/%E9%9D%A2%E6%9D%BF%E6%B1%87%E6%80%BB.png) -## 3 Appendix, Detailed Monitoring Metrics +## 3. Appendix, Detailed Monitoring Metrics ### 3.1 System Dashboard diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md index a5dd070ba..fe3c3eb52 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md @@ -22,7 +22,7 @@ This guide introduces how to set up a standalone TimechoDB instance, which includes one ConfigNode and one DataNode (commonly referred to as 1C1D). -## 1 Prerequisites +## 1. Prerequisites 1. **System Preparation**: Ensure the system has been configured according to the [System Requirements](../Deployment-and-Maintenance/Environment-Requirements.md). @@ -46,7 +46,7 @@ Use the hostname for `cn_internal_address` and `dn_internal_address` in IoTDB co 6. **Monitoring Panel**: Deploy a monitoring panel to track key performance metrics. Contact the Timecho team for access and refer to the [Monitoring Board Install and Deploy](../Deployment-and-Maintenance/Monitoring-panel-deployment.md). -## 2 Installation Steps +## 2. Installation Steps ### 2.1 Extract Installation Package @@ -131,7 +131,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database ![](/img/%E5%8D%95%E6%9C%BA-%E9%AA%8C%E8%AF%81.png) -## 3 Common Issues +## 3. Common Issues 1. ConfigNode Fails to Start @@ -167,7 +167,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database rm -rf data logs ``` -## 4 Appendix +## 4. Appendix ### 4.1 ConfigNode Parameters diff --git a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md index 86c70ce67..96ebbbdeb 100644 --- a/src/UserGuide/latest-Table/Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md +++ b/src/UserGuide/latest-Table/Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md @@ -22,7 +22,7 @@ This guide introduces how to set up a standalone TimechoDB instance, which includes one ConfigNode and one DataNode (commonly referred to as 1C1D). -## 1 Prerequisites +## 1. Prerequisites 1. **System Preparation**: Ensure the system has been configured according to the [System Requirements](../Deployment-and-Maintenance/Environment-Requirements.md). @@ -46,7 +46,7 @@ Use the hostname for `cn_internal_address` and `dn_internal_address` in IoTDB co 6. **Monitoring Panel**: Deploy a monitoring panel to track key performance metrics. Contact the Timecho team for access and refer to the [Monitoring Board Install and Deploy](../Deployment-and-Maintenance/Monitoring-panel-deployment.md). -## 2 Installation Steps +## 2. Installation Steps ### 2.1 Extract Installation Package @@ -185,7 +185,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database ![](/img/%E5%8D%95%E6%9C%BA-%E9%AA%8C%E8%AF%81.png) -## 3 Common Issues +## 3. Common Issues 1. Activation Fails Repeatedly 1. Use the `ls -al` command to verify that the ownership of the installation directory matches the current user. @@ -225,7 +225,7 @@ Check the `ClusterActivationStatus` field. If it shows `ACTIVATED`, the database rm -rf data logs ``` -## 4 Appendix +## 4. Appendix ### 4.1 ConfigNode Parameters diff --git a/src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduce_apache.md b/src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduction_apache.md similarity index 98% rename from src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduce_apache.md rename to src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduction_apache.md index 21bdfbeba..d94979310 100644 --- a/src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduce_apache.md +++ b/src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduction_apache.md @@ -28,7 +28,7 @@ Apache IoTDB is a low-cost, high-performance IoT-native time-series database. It - Installation, Deployment, and Usage Documentation: [Quick Start](../QuickStart/QuickStart_apache.md) -## Product Ecosystem +## 1. Product Ecosystem The IoTDB ecosystem consists of multiple components designed to efficiently manage and analyze massive IoT-generated time-series data. @@ -44,14 +44,14 @@ Key components include: 3. **Time-Series Model Training-Inference Engine (IoTDB AINode)**: A unified engine for intelligent analysis, supporting model training, data management, and integration with machine/deep learning frameworks. -## TimechoDB Architecture +## 2. TimechoDB Architecture The diagram below illustrates a typical IoTDB cluster deployment (3 ConfigNodes and 3 DataNodes): -## Key Features +## 3. Key Features Apache IoTDB offers the following advantages: @@ -92,7 +92,7 @@ Apache IoTDB offers the following advantages: - Hadoop, Spark, Grafana, ThingsBoard, DataEase, etc. -## TimechoDB +## 4. TimechoDB Timecho Technology has developed **TimechoDB**, a commercial product built on the open-source version of Apache IoTDB, to provide enterprise-grade solutions and services for businesses and commercial clients. TimechoDB addresses the multifaceted challenges enterprises face when building IoT big data platforms for managing time-series data, including complex application scenarios, massive data volumes, high sampling frequencies, frequent out-of-order data, time-consuming data processing, diverse analytical requirements, and high storage and maintenance costs. diff --git a/src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduce_timecho.md b/src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduction_timecho.md similarity index 97% rename from src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduce_timecho.md rename to src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduction_timecho.md index 0113ec4b5..60c0cbf44 100644 --- a/src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduce_timecho.md +++ b/src/UserGuide/latest-Table/IoTDB-Introduction/IoTDB-Introduction_timecho.md @@ -18,6 +18,7 @@ under the License. --> +# Product Introduction TimechoDB is a high-performance, cost-efficient, and IoT-native time-series database developed by Timecho. As an enterprise-grade extension of Apache IoTDB, it is designed to tackle the complexities of managing large-scale time-series data in IoT environments. These challenges include high-frequency data sampling, massive data volumes, out-of-order data, extended processing times, diverse analytical demands, and high storage and maintenance costs. @@ -25,7 +26,7 @@ TimechoDB enhances Apache IoTDB with superior functionality, optimized performan - [Quick Start](../QuickStart/QuickStart_timecho.md): Download, Deploy, and Use -## TimechoDB Data Management Solution +## 1. TimechoDB Data Management Solution The Timecho ecosystem provides an integrated **collect-store-use** solution, covering the complete lifecycle of time-series data, from acquisition to analysis. @@ -48,13 +49,13 @@ Key components include: 1. Supports **various industrial protocols, resumable transfers, and network barrier penetration**. 2. Facilitates **reliable data acquisition in challenging industrial environments**. -## TimechoDB Architecture +## 2. TimechoDB Architecture The diagram below illustrates a common cluster deployment (3 ConfigNodes, 3 DataNodes) of TimechoDB: ![](/img/Cluster-Concept03.png) -### Key Features +## 3. Key Features TimechoDB offers the following advantages: @@ -100,7 +101,7 @@ TimechoDB offers the following advantages: - Seamlessly integrates with big data frameworks (Hadoop, Spark) and visualization tools (Grafana, ThingsBoard, DataEase). - Supports device management for industrial IoT environments. -### Enterprise-level Enhancements +## 4. Enterprise-level Enhancements TimechoDB extends the open-source version with advanced industrial-grade capabilities, including tiered storage, cloud-edge collaboration, visualization tools, and security upgrades. @@ -258,11 +259,11 @@ TimechoDB extends the open-source version with advanced industrial-grade capabil -#### Higher Efficiency and Stability +### 4.1 Higher Efficiency and Stability TimechoDB achieves up to 10x performance improvements over Apache IoTDB in mission-critical workloads, and provides rapid fault recovery for industrial environments. -#### Comprehensive Management Tools +### 4.2 Comprehensive Management Tools TimechoDB simplifies deployment, monitoring, and maintenance through an intuitive toolset: @@ -281,7 +282,7 @@ TimechoDB simplifies deployment, monitoring, and maintenance through an intuitiv - **Cluster Management Tool** **:** - Provides **one-click operations** for cluster deployment, scaling, start/stop, and configuration updates. -#### Professional Enterprise Technical Services +### 4.3 Professional Enterprise Technical Services TimechoDB offers **vendor-backed enterprise services** to support industrial-scale deployments: @@ -292,6 +293,6 @@ TimechoDB offers **vendor-backed enterprise services** to support industrial-sca Compared to the open-source version’s 2-3 month release cycle, TimechoDB delivers faster updates and same-day critical issue resolutions, ensuring production stability. -#### Ecosystem Compatibility & Compliance +### 4.4 Ecosystem Compatibility & Compliance imechoDB is self-developed, supports mainstream CPUs & operating systems, and meets industry compliance standards, making it a reliable choice for enterprise IoT deployments. \ No newline at end of file diff --git a/src/UserGuide/latest-Table/IoTDB-Introduction/Release-history_timecho.md b/src/UserGuide/latest-Table/IoTDB-Introduction/Release-history_timecho.md index 9cf91d467..3789b1873 100644 --- a/src/UserGuide/latest-Table/IoTDB-Introduction/Release-history_timecho.md +++ b/src/UserGuide/latest-Table/IoTDB-Introduction/Release-history_timecho.md @@ -18,10 +18,11 @@ under the License. --> +# Release History -### TimechoDB (Database Core) +## 1. TimechoDB (Database Core) -#### **V1.3.4.1** +### **V1.3.4.1** > **Release Date**: January 8, 2025 > @@ -39,7 +40,7 @@ Version V1.3.4.1 introduces a pattern-matching function and further optimizes th - `import-data`/`export-data` scripts now support new data types (strings, large binary objects, dates, timestamps). - Unified import/export compatibility for TsFile, CSV, and SQL formats. -#### **V1.3.3.3** +### **V1.3.3.3** > **Release Date**: October 31, 2024 > @@ -60,7 +61,7 @@ Version V1.3.3.3 adds the following features: optimization of restart and recove - Added Kubernetes Helm support. - Python client now supports new data types (strings, large binary objects, dates, timestamps). -#### **V1.3.3.2** +### **V1.3.3.2** > **Release Date**: August 15, 2024 > @@ -76,7 +77,7 @@ Version V1.3.3.2 supports outputting the time consumption of reading `mods `file - **Data Synchronization**: RPC compression now supports configurable levels. - **Scripts & Tools**: Metadata export excludes only `root.__system`, not similar prefixes. -#### **V1.3.3.1** +### **V1.3.3.1** > **Release Date**: July 12, 2024 > @@ -93,7 +94,7 @@ In version V1.3.3.1, a throttling mechanism is added to multi-tier storage. Data - Improved filter performance for aggregation and WHERE clauses. - Java Session client distributes SQL query requests evenly to all nodes. -#### **V1.3.2.2** +### **V1.3.2.2** > **Release Date**: June 4, 2024 > @@ -133,7 +134,7 @@ The V1.3.2.2 version introduces the Explain Analyze statement for analyzing the - Introduced `export-data/import-data` scripts to support data export in `CSV`, `TsFile `, or as `SQL `statements. - The Windows environment now supports distinguishing `ConfigNode`, `DataNode`, and `Cli `by window name. -#### **V1.3.1.4** +### **V1.3.1.4** > **Release Date**: April 23, 2024 > @@ -163,7 +164,7 @@ The V1.3.1 release introduces several new features and enhancements, including t - Added one-click scripts to start and stop the cluster (`start-all/stop-all.sh & start-all/stop-all.bat`). - Added one-click scripts to collect instance information (`collect-info.sh & collect-info.bat`). -#### **V1.3.0.4** +### **V1.3.0.4** > **Release Date**: January 3, 2024 > @@ -192,7 +193,7 @@ The V1.3.0.4 release introduces a new inborn machine learning framework `AINode` - Non-writable view sequences now support `LAST` queries. - Optimized the accuracy of data point monitoring statistics. -#### **V1.2.0.1** +### **V1.2.0.1** > **Release Date**: June 30, 2023 > @@ -225,7 +226,7 @@ The V1.2.0.1 release introduces several new features, including a new stream pro - Python client now supports write redirection. - Session API added an interface for creating sequences in batches using templates. -#### **V1.1.0.1** +### **V1.1.0.1** > **Release Date**: April 3, 2023 > @@ -253,7 +254,7 @@ The V1.1.0.1 release introduces several new features, including support for `GRO - Aggregation queries now support `GROUP BY CONDITION`. - Added support for modifying `dn_rpc_port` and `dn_rpc_address`. -#### **V1.0.0.1** +### **V1.0.0.1** > **Release Date**: December 3, 2022 > @@ -282,7 +283,7 @@ The V1.0.0.1 release focuses on fixing issues related to partition computation a - Added support for the stream processing framework. - Added support for data synchronization between clusters. -### Workbench (Console Tool) +## 2. Workbench (Console Tool) | Version | Key New Features | Supported IoTDB Versions | | :------ | :--------------------------------------- | :----------------------- | diff --git a/src/UserGuide/latest-Table/IoTDB-Introduction/Scenario.md b/src/UserGuide/latest-Table/IoTDB-Introduction/Scenario.md index 6709c7009..2ecb64c77 100644 --- a/src/UserGuide/latest-Table/IoTDB-Introduction/Scenario.md +++ b/src/UserGuide/latest-Table/IoTDB-Introduction/Scenario.md @@ -18,62 +18,63 @@ under the License. --> +# Scenario -## Scenario 1: Energy & Power +## 1. Energy & Power -#### **Background** +### 1.1 **Background** By collecting, storing, and analyzing massive time-series data from power generation, transmission, storage, and consumption processes—combined with real-time monitoring, accurate forecasting, and intelligent scheduling of power systems—enterprises can significantly improve energy efficiency, reduce operational costs, ensure the safety and sustainability of energy production, and maintain the stable operation of power grids. -#### **Architecture** +### 1.2 **Architecture** IoTDB provides a self-hosted time-series database solution with high availability, efficient data synchronization across networks, and optimized performance for large-scale data ingestion and querying. It enables power enterprises to handle large-scale time-series data efficiently, supporting real-time anomaly detection, forecasting models, and intelligent scheduling for both traditional and renewable energy sources. ![](/img/scenario-energy-en.png) -## Scenario 2: Aerospace +## 2. Aerospace -#### **Background** +### 2.1 **Background** With the rapid evolution of aerospace technology, digital transformation has become essential to improving flight safety and system performance. The aerospace industry generates vast amounts of time-series data throughout the lifecycle of aircraft, rockets, and satellites—from design and manufacturing to testing and operation. Managing and analyzing telemetry data in real time is critical for mission reliability, system optimization, and failure prevention. -#### **Architecture** +### 2.2 **Architecture** IoTDB’s high-performance time-series data processing capabilities enable real-time telemetry analysis, low-bandwidth data synchronization, and seamless offline data migration. Its flexible deployment and resource-efficient architecture provide a reliable foundation for aerospace enterprises, facilitating intelligent monitoring, rapid fault diagnosis, and continuous optimization of critical systems. ![](/img/scenario-aerospace-en.png) -## Scenario 3: Transportation +## 3. Transportation -#### **Background** +### 3.1 **Background** The rapid growth of the transportation industry has heightened demand for diversified data management, particularly in critical hubs like railways and subways, where real-time, reliable, and precise data is essential. By leveraging multi-dimensional operational, condition, and geospatial data from trains, subways, ships, and vehicles, enterprises can enable intelligent scheduling, fault prediction, route optimization, and efficient maintenance. These capabilities not only improve operational efficiency but also reduce management costs. -#### **Architecture** +### 3.2 **Architecture** IoTDB’s high-throughput time-series database supports low-latency queries, high concurrency, and efficient processing of multi-source heterogeneous data. It provides a scalable foundation for intelligent transportation systems, enabling real-time analytics for vehicle monitoring, traffic flow optimization, and predictive fault detection across large-scale transportation networks. ![](/img/scenario-transportation-en.png) -## Scenario 4: Steel & Metallurgy +## 4. Steel & Metallurgy -#### **Background** +### 4.1 **Background** Facing increasing market competition and stringent environmental regulations, the steel and metallurgy industry is undergoing digital transformation. Industrial IoT platforms play a crucial role in optimizing production efficiency, improving product quality, and reducing energy consumption. Real-time data collection and analysis across smelting equipment, production lines, and supply chains enable intelligent monitoring, predictive maintenance, and precise process control. -#### **Architecture** +### 4.2 **Architecture** IoTDB’s powerful data storage and computing capabilities provide cross-platform compatibility, lightweight deployment options, and robust integration with industrial automation systems. Its ability to efficiently handle high-frequency time-series data empowers steel and metallurgy enterprises to implement smart manufacturing solutions and accelerate digitalization. ![](/img/scenario-steel-en.png) -## Scenario 5: IoT +## 5. IoT -#### **Background** +### 5.1 **Background** The Internet of Things (IoT) is driving digital transformation across industries by enabling real-time device connectivity and intelligent management. As IoT deployments scale, enterprises require a time-series data management system capable of processing vast data streams from edge devices to the cloud. Ensuring high-performance data storage, fast querying, and reliable synchronization is crucial for applications such as equipment monitoring, anomaly detection, and predictive maintenance. -#### **Architecture** +### 5.2 **Architecture** As a IoT-native high-performance time-series database, IoTDB supports end-to-end data synchronization and analysis from edge devices to the cloud. With high-concurrency processing capabilities, it meets the demands of large-scale device connectivity. IoTDB provides flexible data solutions to unlock deeper insights from operational data, improve efficiency, and drive comprehensive IoT business growth. diff --git a/src/UserGuide/latest-Table/QuickStart/QuickStart_apache.md b/src/UserGuide/latest-Table/QuickStart/QuickStart_apache.md index ea7846223..a7b242d34 100644 --- a/src/UserGuide/latest-Table/QuickStart/QuickStart_apache.md +++ b/src/UserGuide/latest-Table/QuickStart/QuickStart_apache.md @@ -23,7 +23,7 @@ This document will guide you through methods to get started quickly with IoTDB. -## How to Install and Deploy? +## 1. How to Install and Deploy? This guide will assist you in quickly installing and deploying IoTDB. You can quickly navigate to the content you need to review through the following document links: @@ -41,7 +41,7 @@ This guide will assist you in quickly installing and deploying IoTDB. You can qu > ❗️Note: We currently still recommend direct installation and deployment on physical/virtual machines. For Docker deployment, please refer to [Docker Deployment](../Deployment-and-Maintenance/Docker-Deployment_apache.md) -## How to Use IoTDB? +## 2. How to Use IoTDB? 1. Database Modeling Design: Database modeling is a crucial step in creating a database system, involving the design of data structures and relationships to ensure that the organization of data meets the needs of specific applications. The following documents will help you quickly understand IoTDB's modeling design: @@ -69,7 +69,7 @@ This guide will assist you in quickly installing and deploying IoTDB. You can qu 6. Application Programming Interfaces (APIs): IoTDB provides various application programming interfaces (APIs) to facilitate developers' interaction with IoTDB in applications. Currently supported interfaces include [Java Native API](../API/Programming-Java-Native-API_apache.md)、[Python Native API](../API/Programming-Python-Native-API.md)、[JDBC](../API/Programming-JDBC_apache.md), and more. For more programming interfaces, please refer to the [Application Programming Interfaces] section on the official website. -## Want to learn more technical details? +## 3. Want to learn more technical details? If you want to explore IoTDB’s internal mechanisms further, refer to the following documents: diff --git a/src/UserGuide/latest-Table/QuickStart/QuickStart_timecho.md b/src/UserGuide/latest-Table/QuickStart/QuickStart_timecho.md index 3bc70e462..388310388 100644 --- a/src/UserGuide/latest-Table/QuickStart/QuickStart_timecho.md +++ b/src/UserGuide/latest-Table/QuickStart/QuickStart_timecho.md @@ -23,7 +23,7 @@ This document will guide you through methods to get started quickly with IoTDB. -## How to Install and Deploy? +## 1. How to Install and Deploy? This guide will assist you in quickly installing and deploying IoTDB. You can quickly navigate to the content you need to review through the following document links: @@ -48,7 +48,7 @@ This guide will assist you in quickly installing and deploying IoTDB. You can qu - Monitoring Panel: Provides hundreds of database monitoring metrics for fine-grained monitoring of IoTDB and its operating system, assisting in system optimization, performance tuning, and bottleneck detection. For installation steps, please see [Monitoring-panel Deployment ](../Deployment-and-Maintenance/Monitoring-panel-deployment.md) -## How to Use IoTDB? +## 2. How to Use IoTDB? 1. Database Modeling Design: Database modeling is a crucial step in creating a database system, involving the design of data structures and relationships to ensure that the organization of data meets the needs of specific applications. The following documents will help you quickly understand IoTDB's modeling design: @@ -76,14 +76,14 @@ This guide will assist you in quickly installing and deploying IoTDB. You can qu 6. Application Programming Interfaces (APIs): IoTDB provides various application programming interfaces (APIs) to facilitate developers' interaction with IoTDB in applications. Currently supported interfaces include [Java Native API](../API/Programming-Java-Native-API_timecho.md)、[Python Native API](../API/Programming-Python-Native-API.md)、[JDBC](../API/Programming-JDBC_timecho.md), and more. For more programming interfaces, please refer to the [Application Programming Interfaces] section on the official website. -## What other convenient tools are available? +## 3. What other convenient tools are available? In addition to its own rich features, IoTDB is complemented by a comprehensive suite of peripheral tools. This guide will help you quickly understand and use these tools: - Monitoring Panel: A tool for detailed monitoring of IoTDB and its operating system, covering hundreds of database monitoring indicators such as database performance and system resources, helping system optimization and bottleneck identification. For a detailed usage introduction, please refer to [Monitor Tool](../Tools-System/Monitor-Tool_timecho.md) -## Want to learn more technical details? +## 4. Want to learn more technical details? If you want to explore IoTDB’s internal mechanisms further, refer to the following documents: diff --git a/src/UserGuide/latest-Table/Reference/Sample-Data.md b/src/UserGuide/latest-Table/Reference/Sample-Data.md index b838cd49b..966de22c6 100644 --- a/src/UserGuide/latest-Table/Reference/Sample-Data.md +++ b/src/UserGuide/latest-Table/Reference/Sample-Data.md @@ -18,15 +18,16 @@ under the License. --> +# Sample Data This section introduces a simple time-series data application scenario, along with the modeling and sample data for this scenario. All example SQL statements in the IoTDB Table Model User Guide can be executed using this modeling and sample data. -## Data Structure +## 1. Data Structure The structures of `table1` and `table2` are as follows: ![](/img/sample-dataset-en-01.png) -## Import Statements +## 2. Import Statements Below are the SQL statements to create the above table structures and insert data. You can download the complete SQL script ([sample_data.sql](/img/sample_data.sql)) to execute these statements in the CLI to import the data into IoTDB. diff --git a/src/UserGuide/latest-Table/Reference/Status-Codes.md b/src/UserGuide/latest-Table/Reference/Status-Codes.md index 339a19d7d..39fef7022 100644 --- a/src/UserGuide/latest-Table/Reference/Status-Codes.md +++ b/src/UserGuide/latest-Table/Reference/Status-Codes.md @@ -1,3 +1,25 @@ + +# Status Codes + IoTDB introduces the concept of status codes. For example, since IoTDB needs to register a time series before writing data, one possible solution is: ```Plain diff --git a/src/UserGuide/latest-Table/Reference/System-Config-Manual.md b/src/UserGuide/latest-Table/Reference/System-Config-Manual.md index 360f5e8b6..44e49f3b3 100644 --- a/src/UserGuide/latest-Table/Reference/System-Config-Manual.md +++ b/src/UserGuide/latest-Table/Reference/System-Config-Manual.md @@ -1,4 +1,26 @@ -### IoTDB Configuration Files + +# Configuration and Parameters + +## 1. IoTDB Configuration Files The configuration files for IoTDB are located in the `conf` folder under the IoTDB installation directory. Key configuration files include: @@ -15,18 +37,18 @@ The configuration files for IoTDB are located in the `conf` folder under the IoT 1. Template for the `iotdb-system.properties` file. 2. Provides a reference for all available configuration parameters. -### Modify Configurations +## 2. Modify Configurations -#### 1. **Modify Existing Parameters**: +### 2.1 **Modify Existing Parameters**: - Parameters already present in the `iotdb-system.properties` file can be directly modified. -#### 2. **Adding New Parameters**: +### 2.2 **Adding New Parameters**: - For parameters not listed in `iotdb-system.properties`, you can find them in the `iotdb-system.properties.template` file. - Copy the desired parameter from the template file to `iotdb-system.properties` and modify its value. -### Configuration Update Methods +### 2.3 Configuration Update Methods Different configuration parameters have different update methods, categorized as follows: @@ -42,11 +64,11 @@ Different configuration parameters have different update methods, categorized as - `load configuration`: Reloads the configuration. - `set configuration`: Updates specific configuration parameters. -## Environment Parameters +## 3. Environment Parameters The environment configuration files (`confignode-env.sh/bat` and `datanode-env.sh/bat`) are used to configure Java environment parameters for ConfigNode and DataNode, such as JVM settings. These configurations are passed to the JVM when ConfigNode or DataNode starts. -### **confignode-env.sh/bat** +### 3.1 **confignode-env.sh/bat** - MEMORY_SIZE @@ -75,7 +97,7 @@ The environment configuration files (`confignode-env.sh/bat` and `datanode-env.s | Default | Depends on the `MEMORY_SIZE` configuration. | | Effective | Restart required | -### **datanode-env.sh/bat** +### 3.2 **datanode-env.sh/bat** - MEMORY_SIZE @@ -104,11 +126,11 @@ The environment configuration files (`confignode-env.sh/bat` and `datanode-env.s | Default | Depends on the `MEMORY_SIZE` configuration. | | Effective | Restart required | -## System Parameters (`iotdb-system.properties.template`) +## 4. System Parameters (`iotdb-system.properties.template`) The `iotdb-system.properties` file contains various configurations for managing IoTDB clusters, nodes, replication, directories, monitoring, SSL, connections, object storage, tier management, and REST services. Below is a detailed breakdown of the parameters: -### Cluster Configuration +### 4.1 Cluster Configuration - cluster_name @@ -120,7 +142,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Effective | Use CLI: `set configuration "cluster_name"="xxx"`. | | Note | Changes are distributed across nodes. Changes may not propagate to all nodes in case of network issues or node failures. Nodes that fail to update must manually modify `cluster_name` in their configuration files and restart. Under normal circumstances, it is not recommended to modify `cluster_name` by manually modifying configuration files or to perform hot-loading via `load configuration` method. | -### Seed ConfigNode +### 4.2 Seed ConfigNode - cn_seed_config_node @@ -140,7 +162,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 127.0.0.1:10710 | | Effective | Modify before the first startup. | -### Node RPC Configuration +### 4.3 Node RPC Configuration - cn_internal_address @@ -241,7 +263,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 5000 | | Effective | Restart required. | -### Replication configuration +### 4.4 Replication configuration - config_node_consensus_protocol_class @@ -288,7 +310,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | org.apache.iotdb.consensus.iot.IoTConsensus | | Effective | Modify before the first startup. | -### Directory configuration +### 4.5 Directory configuration - cn_system_dir @@ -416,7 +438,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | data/datanode/system/pipe/consensus/deletion(Windows:data\\datanode\\system\\pipe\\consensus\\deletion) | | Effective | Restart required | -### Metric Configuration +### 4.6 Metric Configuration - cn_metric_reporter_list @@ -499,7 +521,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | IOTDB | | Effective | Restart required. | -### SSL Configuration +### 4.7 SSL Configuration - enable_thrift_ssl @@ -537,7 +559,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | None | | Effective | Restart required. | -### Connection Configuration +### 4.8 Connection Configuration - cn_rpc_thrift_compression_enable @@ -683,7 +705,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 300 | | Effective | Restart required. | -### Object storage management +### 4.9 Object storage management - remote_tsfile_cache_dirs @@ -757,7 +779,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | None | | Effective | Restart required. | -### Tier management +### 4.10 Tier management - dn_default_space_usage_thresholds @@ -795,7 +817,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 10485760 | | Effective | Hot reload. | -### REST Service Configuration +### 4.11 REST Service Configuration - enable_rest_service @@ -896,7 +918,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 5000 | | Effective | Restart required. | -### Load balancing configuration +### 4.12 Load balancing configuration - series_slot_num @@ -988,7 +1010,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | true | | Effective | Restart required. | -### Cluster management +### 4.13 Cluster management - time_partition_origin @@ -1029,7 +1051,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 0.05 | | Effective | Restart required. | -### Memory Control Configuration +### 4.14 Memory Control Configuration - datanode_memory_proportion @@ -1157,7 +1179,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | true | | Effective | Hot reload. | -### Schema Engine Configuration +### 4.15 Schema Engine Configuration - schema_engine_mode @@ -1249,7 +1271,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | -1 | | Effective | Restart required. | -### Configurations for creating schema automatically +### 4.16 Configurations for creating schema automatically - enable_auto_create_schema @@ -1359,7 +1381,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | PLAIN | | Effective | Restart required. | -### Query Configurations +### 4.17 Query Configurations - read_consistency_level @@ -1532,7 +1554,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 10 | | Effective | Hot reload | -### TTL Configuration +### 4.18 TTL Configuration - ttl_check_interval @@ -1561,7 +1583,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 0.3 | | Effective | Restart required. | -### Storage Engine Configuration +### 4.19 Storage Engine Configuration - timestamp_precision @@ -1725,7 +1747,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | -1 | | Effective | Restart required. | -### Compaction Configurations +### 4.20 Compaction Configurations - enable_seq_space_compaction @@ -2033,7 +2055,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 4 | | Effective | Hot reload | -### Write Ahead Log Configuration +### 4.21 Write Ahead Log Configuration - wal_mode @@ -2161,7 +2183,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | true | | Effective | Hot reload | -### **IoTConsensus Configuration** +### 4.22 **IoTConsensus Configuration** - data_region_iot_max_log_entries_num_per_batch @@ -2208,7 +2230,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 33554432 | | Effective | Restart required. | -### TsFile Configurations +### 4.23 TsFile Configurations - group_size_in_byte @@ -2300,7 +2322,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | None | | Effective | Restart required. | -### Authorization Configuration +### 4.24 Authorization Configuration - authorizer_provider_class @@ -2357,7 +2379,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 30 | | Effective | Restart required. | -### UDF Configuration +### 4.25 UDF Configuration - udf_initial_byte_array_length_for_memory_control @@ -2395,7 +2417,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | ext/udf(Windows:ext\\udf) | | Effective | Restart required. | -### Trigger Configuration +### 4.26 Trigger Configuration - trigger_lib_dir @@ -2415,7 +2437,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 3 | | Effective | Restart required. | -### **Select-Into Configuration** +### 4.27 **Select-Into Configuration** - into_operation_buffer_size_in_byte @@ -2444,7 +2466,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 2 | | Effective | Restart required. | -### Continuous Query Configuration +### 4.28 Continuous Query Configuration - continuous_query_submit_thread_count @@ -2464,7 +2486,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 1000 | | Effective | Restart required. | -### Pipe Configuration +### 4.29 Pipe Configuration - pipe_lib_dir @@ -2538,7 +2560,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | -1 | | Effective | Hot reload | -### RatisConsensus Configuration +### 4.30 RatisConsensus Configuration - config_node_ratis_log_appender_buffer_size_max @@ -2999,7 +3021,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 86400 (s) | | Effective | Restart required. | -### IoTConsensusV2 Configuration +### 4.31 IoTConsensusV2 Configuration - iot_consensus_v2_pipeline_size @@ -3019,7 +3041,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | batch | | Effective | Restart required. | -### Procedure Configuration +### 4.32 Procedure Configuration - procedure_core_worker_thread_count @@ -3048,7 +3070,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 60(s) | | Effective | Restart required. | -### MQTT Broker Configuration +### 4.33 MQTT Broker Configuration - enable_mqtt_service @@ -3104,7 +3126,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 1048576 | | Effective | Hot reload | -### Audit log Configuration +### 4.34 Audit log Configuration - enable_audit_log @@ -3142,7 +3164,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | true | | Effective | Restart required. | -### White List Configuration +### 4.35 White List Configuration - enable_white_list @@ -3153,7 +3175,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | false | | Effective | Hot reload | -### IoTDB-AI Configuration +### 4.36 IoTDB-AI Configuration - model_inference_execution_thread_count @@ -3164,7 +3186,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 5 | | Effective | Restart required. | -### Load TsFile Configuration +### 4.37 Load TsFile Configuration - load_clean_up_task_execution_delay_time_seconds @@ -3229,7 +3251,7 @@ The `iotdb-system.properties` file contains various configurations for managing | Default | 5 | | Effective | Restart required. | -### Dispatch Retry Configuration +### 4.38 Dispatch Retry Configuration - enable_retry_for_unknown_error diff --git a/src/UserGuide/latest-Table/SQL-Manual/Basis-Function.md b/src/UserGuide/latest-Table/SQL-Manual/Basis-Function.md index f8a5cf354..6dfbac129 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/Basis-Function.md +++ b/src/UserGuide/latest-Table/SQL-Manual/Basis-Function.md @@ -21,9 +21,9 @@ # Basic Functions -## Comparison Functions and Operators +## 1. Comparison Functions and Operators -### 1. Basic Comparison Operators +### 1.1 Basic Comparison Operators Comparison operators are used to compare two values and return the comparison result (`true` or `false`). @@ -37,14 +37,14 @@ Comparison operators are used to compare two values and return the comparison re | <> | Not equal to | | != | Not equal to | -#### 1.1 Comparison rules: +#### 1.1.1 Comparison rules: 1. All types can be compared with themselves. 2. Numeric types (INT32, INT64, FLOAT, DOUBLE, TIMESTAMP) can be compared with each other. 3. Character types (STRING, TEXT) can also be compared with each other. 4. Comparisons between types other than those mentioned above will result in an error. -### 2. BETWEEN Operator +### 1.2 BETWEEN Operator 1. The `BETWEEN `operator is used to determine whether a value falls within a specified range. 2. The `NOT BETWEEN` operator is used to determine whether a value does not fall within a specified range. @@ -72,7 +72,7 @@ Example 2 : NOT BETWEEN SELECT * FROM table1 WHERE humidity NOT BETWEEN 35.0 AND 40.0; ``` -### 3. IS NULL Operator +### 1.3 IS NULL Operator 1. These operators apply to all data types. @@ -88,7 +88,7 @@ Example 2: Query records where humidity is not NULL SELECT * FROM table1 WHERE humidity IS NOT NULL; ``` -### 4. IN Operator +### 1.4 IN Operator 1. The `IN` operator can be used in the `WHERE `clause to compare a column with a list of values. 2. These values can be provided by a static array or scalar expressions. @@ -119,15 +119,15 @@ Example 3: Query records where region is not 'Beijing' or 'Shanghai' SELECT * FROM table1 WHERE region NOT IN ('Beijing', 'Shanghai'); ``` -## Aggregate functions +## 2. Aggregate functions -### 1. Overview +### 2.1 Overview 1. Aggregate functions are many-to-one functions. They perform aggregate calculations on a set of values to obtain a single aggregate result. 2. Except for `COUNT()`, all other aggregate functions ignore null values and return null when there are no input rows or all values are null. For example, `SUM()` returns null instead of zero, and `AVG()` does not include null values in the count. -### 2. Supported Aggregate Functions +### 2.2 Supported Aggregate Functions | Function Name | Description | Allowed Input Types | Output Type | | :------------ | :----------------------------------------------------------- | :------------------------- | :----------------------------------------- | @@ -151,13 +151,13 @@ SELECT * FROM table1 WHERE region NOT IN ('Beijing', 'Shanghai'); | FIRST_BY | FIRST_BY(x, y) finds the value of x in the same row when y is the first non-null value. | x and y can be of any type | Same as the data type of the first input x | | LAST_BY | LAST_BY(x, y) finds the value of x in the same row when y is the last non-null value. | x and y can be of any type | Same as the data type of the first input x | -### 3. Examples +### 2.3 Examples -#### 3.1 Example Data +#### 2.3.1 Example Data The [Example Data page](../Reference/Sample-Data.md) contains SQL statements for building table structures and inserting data. Download and execute these statements in the IoTDB CLI to import the data into IoTDB. You can use this data to test and execute the SQL statements in the examples and obtain the corresponding results. -#### 3.2 Count +#### 2.3.2 Count Counts the number of rows in the entire table and the number of non-null values in the `temperature` column. @@ -179,7 +179,7 @@ Total line number = 1 It costs 0.834s ``` -#### 3.3 First +#### 2.3.3 First Finds the values with the smallest timestamp that are not NULL in the `temperature` and `humidity` columns. @@ -199,7 +199,7 @@ Total line number = 1 It costs 0.170s ``` -#### 3.4 Last +#### 2.3.4 Last Finds the values with the largest timestamp that are not NULL in the `temperature` and `humidity` columns. @@ -219,7 +219,7 @@ Total line number = 1 It costs 0.211s ``` -#### 3.5 First_by +#### 2.3.5 First_by Finds the `time` value of the row with the smallest timestamp that is not NULL in the `temperature` column, and the `humidity` value of the row with the smallest timestamp that is not NULL in the `temperature` column. @@ -239,7 +239,7 @@ Total line number = 1 It costs 0.269s ``` -#### 3.6 Last_by +#### 2.3.6 Last_by Queries the `time` value of the row with the largest timestamp that is not NULL in the `temperature` column, and the `humidity` value of the row with the largest timestamp that is not NULL in the `temperature` column. @@ -259,7 +259,7 @@ Total line number = 1 It costs 0.070s ``` -#### 3.7 Max_by +#### 2.3.7 Max_by Queries the `time` value of the row where the `temperature` column is at its maximum, and the `humidity` value of the row where the `temperature` column is at its maximum. @@ -279,7 +279,7 @@ Total line number = 1 It costs 0.172s ``` -#### 3.8 Min_by +#### 2.3.8 Min_by Queries the `time` value of the row where the `temperature` column is at its minimum, and the `humidity` value of the row where the `temperature` column is at its minimum. @@ -299,9 +299,9 @@ Total line number = 1 It costs 0.244s ``` -## Logical operators +## 3. Logical operators -### 1. Overview +### 3.1 Overview Logical operators are used to combine conditions or negate conditions, returning a Boolean result (`true` or `false`). @@ -313,9 +313,9 @@ Below are the commonly used logical operators along with their descriptions: | OR | True if either value is true | a OR b | | NOT | True when the value is false | NOT a | -### 2. Impact of NULL on Logical Operators +### 3.2 Impact of NULL on Logical Operators -#### 2.1 AND Operator +#### 3.2.1 AND Operator - If one or both sides of the expression are `NULL`, the result may be `NULL`. - If one side of the `AND` operator is `FALSE`, the expression result is `FALSE`. @@ -328,7 +328,7 @@ NULL AND false -- false NULL AND NULL -- null ``` -#### 2.2 OR Operator +#### 3.2.2 OR Operator - If one or both sides of the expression are `NULL`, the result may be `NULL`. - If one side of the `OR` operator is `TRUE`, the expression result is `TRUE`. @@ -341,7 +341,7 @@ NULL OR false -- null NULL OR true -- true ``` -##### 2.2.1 Truth Table +##### 3.2.2.1 Truth Table The following truth table illustrates how `NULL` is handled in `AND` and `OR` operators: @@ -357,7 +357,7 @@ The following truth table illustrates how `NULL` is handled in `AND` and `OR` op | NULL | FALSE | FALSE | NULL | | NULL | NULL | NULL | NULL | -#### 2.3 NOT Operator +#### 3.2.3 NOT Operator The logical negation of `NULL` remains `NULL`. @@ -367,7 +367,7 @@ Example: NOT NULL -- null ``` -##### 2.3.1 Truth Table +##### 3.2.3.1 Truth Table The following truth table illustrates how `NULL` is handled in the `NOT` operator: @@ -377,17 +377,17 @@ The following truth table illustrates how `NULL` is handled in the `NOT` operato | FALSE | TRUE | | NULL | NULL | -## Date and Time Functions and Operators +## 4. Date and Time Functions and Operators -### 1. now() -> Timestamp +### 4.1 now() -> Timestamp Returns the current timestamp. -### 2. date_bin(interval, Timestamp[, Timestamp]) -> Timestamp +### 4.2 date_bin(interval, Timestamp[, Timestamp]) -> Timestamp The `date_bin` function is used for handling time data by rounding a timestamp (`Timestamp`) to the boundary of a specified time interval (`interval`). -## **Syntax:** +#### **Syntax:** ```SQL -- Calculates the time interval starting from timestamp 0 and returns the nearest interval boundary to the specified timestamp. @@ -401,7 +401,7 @@ date_bin(interval,source,origin) --source: Must be of timestamp type. ``` -### **Parameters**: +#### **Parameters**: | Parameter | Description | | :-------- | :----------------------------------------------------------- | @@ -409,7 +409,7 @@ date_bin(interval,source,origin) | source | 1. The timestamp column or expression to be calculated. 2. Must be of timestamp type. | | origin | The reference timestamp. | -### 2.1Syntax Rules : +#### 4.2.1Syntax Rules : 1. If `origin` is not specified, the default reference timestamp is `1970-01-01T00:00:00Z` (Beijing time: `1970-01-01 08:00:00`). 2. `interval` must be a non-negative number with a time unit. If `interval` is `0ms`, the function returns `source` directly without calculation. @@ -419,13 +419,13 @@ date_bin(interval,source,origin) > For example, if the starting point is **April 30, 2000**, calculating `1 DAY` first and then `1 MONTH` results in **June 1, 2000**, whereas calculating `1 MONTH` first and then `1 DAY` results in **May 31, 2000**. The resulting dates are different. -#### 2.2 Examples +#### 4.2.2 Examples ##### Example Data The [Example Data page](../Reference/Sample-Data.md) contains SQL statements for building table structures and inserting data. Download and execute these statements in the IoTDB CLI to import the data into IoTDB. You can use this data to test and execute the SQL statements in the examples and obtain the corresponding results. -### Example 1: Without Specifying the Origin Timestamp +#### Example 1: Without Specifying the Origin Timestamp ```SQL SELECT @@ -464,7 +464,7 @@ Total line number = 18 It costs 0.683s ``` -### Example 2: Specifying the Origin Timestamp +#### Example 2: Specifying the Origin Timestamp ```SQL SELECT @@ -503,7 +503,7 @@ Total line number = 18 It costs 0.056s ``` -### Example 3: Negative Origin +#### Example 3: Negative Origin ```SQL SELECT @@ -542,7 +542,7 @@ Total line number = 18 It costs 0.203s ``` -### Example 4: Interval of 0 +#### Example 4: Interval of 0 ```SQL SELECT @@ -581,7 +581,7 @@ Total line number = 18 It costs 0.107s ``` -### Example 5: Source is NULL +#### Example 5: Source is NULL ```SQL SELECT @@ -620,9 +620,9 @@ Total line number = 18 It costs 0.319s ``` -## Mathematical Functions and Operators +## 5. Mathematical Functions and Operators -### 1. Mathematical Operators +### 5.1 Mathematical Operators | **Operator** | **Description** | | :----------- | :---------------------------------------------- | @@ -633,7 +633,7 @@ It costs 0.319s | % | Modulus (remainder) | | - | Negation | -### 2. Mathematical functions +### 5.2 Mathematical functions | Function Name | Description | Input | Output | Usage | | :------------------------------- | :----------------------------------------------------------- | :-------------------------- | :----------------- | :--------- | @@ -662,13 +662,13 @@ It costs 0.319s | pi | Pi (π) | | double | pi() | -## Conditional Expressions +## 6. Conditional Expressions -### 1.CASE +### 6.1 CASE CASE expressions come in two forms: **Simple CASE** and **Searched CASE**. -#### 1.1 Simple CASE +#### 6.1.1 Simple CASE The simple form evaluates each value expression from left to right until it finds a match with the given expression: @@ -693,7 +693,7 @@ SELECT a, END ``` -#### 1.2 Searched CASE +#### 6.1.2 Searched CASE The searched form evaluates each Boolean condition from left to right until a `TRUE` condition is found, then returns the corresponding result: @@ -718,7 +718,7 @@ SELECT a, b, END ``` -### 2. COALESCE +### 6.2 COALESCE Returns the first non-null value from the given list of parameters. @@ -726,11 +726,11 @@ Returns the first non-null value from the given list of parameters. coalesce(value1, value2[, ...]) ``` -## Conversion Functions +## 7. Conversion Functions -### 1. Conversion Functions +### 7.1 Conversion Functions -#### 1.1 cast(value AS type) → type +#### 7.1.1 cast(value AS type) → type Explicitly converts a value to the specified type. This can be used to convert strings (`VARCHAR`) to numeric types or numeric values to string types. @@ -745,7 +745,7 @@ SELECT * IN (CAST('2024-11-27' AS DATE), CAST('2024-11-28' AS DATE)); ``` -#### 1.2 try_cast(value AS type) → type +#### 7.1.2 try_cast(value AS type) → type Similar to `CAST()`. If the conversion fails, returns `NULL` instead of throwing an error. @@ -758,19 +758,19 @@ SELECT * IN (try_cast('2024-11-27' AS DATE), try_cast('2024-11-28' AS DATE)); ``` -## String Functions and Operators +## 8. String Functions and Operators -### 1. String operators +### 8.1 String operators -#### 1.1 || Operator +#### 8.1.1 || Operator The `||` operator is used for string concatenation and functions the same as the `concat` function. -#### 1.2 LIKE Statement +#### 8.1.2 LIKE Statement The `LIKE` statement is used for pattern matching. For detailed usage, refer to Pattern Matching:[LIKE](#1-like-运算符). -### 2. String Functions +### 8.2 String Functions | Function Name | Description | Input | Output | Usage | | :------------ | :----------------------------------------------------------- | :----------------------------------------------------------- | :------ | :----------------------------------------------------------- | @@ -788,33 +788,33 @@ The `||` operator is used for string concatenation and functions the same as the | `substring` | Extracts a substring from `start_index` to the end of the string. **Notes:** - `start_index` starts at `1`. - Returns `NULL` if input is `NULL`. - Throws an error if `start_index` is greater than string length. | `string`, `start_index` | String | substring(string from start_index)or substring(string, start_index) | | `substring` | Extracts a substring of `length` characters starting from `start_index`. **Notes:** - `start_index` starts at `1`. - Returns `NULL` if input is `NULL`. - Throws an error if `start_index` is greater than string length. - Throws an error if `length` is negative. - If `start_index + length` exceeds `int.MAX`, an overflow error may occur. | `string`, `start_index`, `length` | String | substring(string from start_index for length) or substring(string, start_index, length) | -## Pattern Matching Functions +## 9. Pattern Matching Functions -### 1. LIKE +### 9.1 LIKE -#### 1.1 Usage +#### 9.1.1 Usage The `LIKE `operator is used to compare a value with a pattern. It is commonly used in the `WHERE `clause to match specific patterns within strings. -#### 1.2 Syntax +#### 9.1.2 Syntax ```SQL ... column [NOT] LIKE 'pattern' ESCAPE 'character'; ``` -#### 1.3 Match rules +#### 9.1.3 Match rules - Matching characters is case-sensitive - The pattern supports two wildcard characters: - `_` matches any single character - `%` matches zero or more characters -#### 1.4 Notes +#### 9.1.4 Notes - `LIKE` pattern matching applies to the entire string by default. Therefore, if it's desired to match a sequence anywhere within a string, the pattern must start and end with a percent sign. - To match the escape character itself, double it (e.g., `\\` to match `\`). For example, you can use `\\` to match for `\`. -#### 1.5 Examples +#### 9.1.5 Examples #### **Example 1: Match Strings Starting with a Specific Character** @@ -856,19 +856,19 @@ SELECT * FROM table1 WHERE continent LIKE 'South\_%' ESCAPE '\'; SELECT * FROM table1 WHERE continent LIKE 'South\\%' ESCAPE '\'; ``` -### 2. regexp_like +### 9.2 regexp_like -#### 2.1 Usage +#### 9.2.1 Usage Evaluates whether the regular expression pattern is present within the given string. -#### 2.2 Syntax +#### 9.2.2 Syntax ```SQL regexp_like(string, pattern); ``` -#### 2.3 Notes +#### 9.2.3 Notes - The pattern for `regexp_like` only needs to be contained within the string, and does not need to match the entire string. - To match the entire string, use the `^` and `$` anchors. @@ -891,7 +891,7 @@ regexp_like(string, pattern); 4. Categories: Specify directly, without the need for `Is`, `general_category=`, or `gc=` prefixes (e.g., `\p{L}`). 5. Binary properties: Specify directly, without `Is` (e.g., `\p{NoncharacterCodePoint}`). -#### 2.4 Examples +#### 9.2.4 Examples #### Example 1: **Matching strings containing a specific pattern** diff --git a/src/UserGuide/latest-Table/SQL-Manual/Featured-Functions.md b/src/UserGuide/latest-Table/SQL-Manual/Featured-Functions.md index f6aa21610..c85dd00f7 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/Featured-Functions.md +++ b/src/UserGuide/latest-Table/SQL-Manual/Featured-Functions.md @@ -18,31 +18,24 @@ under the License. --> +# Featured Functions -# 特色函数 +## 1. Downsampling Functions -## 时序特色函数 +### 1.1 `date_bin` Function -### 1. 降采样函数 +#### **Description:** -#### 1.1 `date_bin` 函数 +The `date_bin` function is a scalar function that aligns timestamps to the start of specified time intervals. It is commonly used with the `GROUP BY` clause for downsampling. -##### 功能描述: +- **Partial Intervals May Be Empty:** Only timestamps that meet the conditions are aligned; missing intervals are not filled. +- **All Intervals Return Empty:** If no data exists within the query range, the downsampling result is an empty set. -`date_bin` 是一个标量函数,用于将时间戳规整到指定的时间区间起点,并结合 `GROUP BY` 子句实现降采样。 +#### **Usage** **Examples****:** -- 部分区间结果为空:只会对满足条件的数据进行时间戳规整,不会填充缺失的时间区间。 -- 全部区间结果为空::满足条件的整个查询范围内没有数据时,降采样返回空结果集 +**Sample Dataset****:** The example data page contains SQL statements for building table structures and inserting data. Download and execute these statements in the IoTDB CLI to import the data into IoTDB. You can use this data to test and execute the SQL statements in the examples and obtain the corresponding results. -##### 使用示例: - -###### 示例数据 - - -The [Example Data page](../Reference/Sample-Data.md) contains SQL statements for building table structures and inserting data. Download and execute these statements in the IoTDB CLI to import the data into IoTDB. You can use this data to test and execute the SQL statements in the examples and obtain the corresponding results. - - -Example 1: Hourly Average Temperature for Device 100 +**Example 1: Hourly Average Temperature for Device 100** ```SQL SELECT date_bin(1h, time) AS hour_time, avg(temperature) AS avg_temp @@ -52,7 +45,7 @@ WHERE (time >= 2024-11-27 00:00:00 AND time <= 2024-11-30 00:00:00) GROUP BY 1; ``` -Result: +**Result****:** ```Plain +-----------------------------+--------+ @@ -67,7 +60,7 @@ Result: +-----------------------------+--------+ ``` -Example 2: Hourly Average Temperature for Each Device +**Example 2: Hourly Average Temperature for Each Device** ```SQL SELECT date_bin(1h, time) AS hour_time, device_id, avg(temperature) AS avg_temp @@ -76,7 +69,7 @@ WHERE time >= 2024-11-27 00:00:00 AND time <= 2024-11-30 00:00:00 GROUP BY 1, device_id; ``` -Result: +**Result:** ```Plain +-----------------------------+---------+--------+ @@ -119,30 +112,30 @@ SELECT date_bin(1h, time) AS hour_time, avg(temperature) AS avg_temp +-----------------------------+--------+ ``` -#### 1.2 `date_bin_gapfill` Function +### 1.2 `date_bin_gapfill` Function -##### Description: +#### **Description:** The `date_bin_gapfill` function is an extension of `date_bin` that fills in missing time intervals, returning a complete time series. - **Partial Intervals May Be Empty**: Aligns timestamps for data that meets the conditions and fills in missing intervals. - **All Intervals Return Empty**: If no data exists within the query range, the result is an empty set. -##### Limitations: +#### **Limitations:** -- The function must always be used with the `GROUP BY` clause. If used elsewhere, it behaves like `date_bin` without gap-filling. -- A `GROUP BY` clause can contain only one instance of date_bin_gapfill. Multiple calls will result in an error. -- The `GAPFILL` operation occurs after the `HAVING` clause and before the `FILL` clause. -- The `WHERE` clause must include time filters in one of the following forms: - - `time >= XXX AND time <= XXX` - - `time > XXX AND time < XXX` - - `time BETWEEN XXX AND XXX` -- If additional time filters or conditions are used, an error is raised. Time conditions and other value filters must be connected using the `AND` operator. -- If `startTime` and `endTime` cannot be inferred from the `WHERE` clause, an error is raised. +1. The function must always be used with the `GROUP BY` clause. If used elsewhere, it behaves like `date_bin` without gap-filling. +2. A `GROUP BY` clause can contain only one instance of date_bin_gapfill. Multiple calls will result in an error. +3. The `GAPFILL` operation occurs after the `HAVING` clause and before the `FILL` clause. +4. The `WHERE` clause must include time filters in one of the following forms: + 1. `time >= XXX AND time <= XXX` + 2. `time > XXX AND time < XXX` + 3. `time BETWEEN XXX AND XXX` +5. If additional time filters or conditions are used, an error is raised. Time conditions and other value filters must be connected using the `AND` operator. +6. If `startTime` and `endTime` cannot be inferred from the `WHERE` clause, an error is raised. -##### Usage Examples +**Usage** **Examples****:** -Example 1: Fill Missing Intervals +**Example 1: Fill Missing Intervals** ```SQL SELECT date_bin_gapfill(1h, time) AS hour_time, avg(temperature) AS avg_temp @@ -152,7 +145,7 @@ WHERE (time >= 2024-11-28 07:00:00 AND time <= 2024-11-28 16:00:00) GROUP BY 1; ``` -Result: +**Result:** ```Plain +-----------------------------+--------+ @@ -171,7 +164,7 @@ Result: +-----------------------------+--------+ ``` -Example 2: Fill Missing Intervals with Device Grouping +**Example 2: Fill Missing Intervals with Device Grouping** ```SQL SELECT date_bin_gapfill(1h, time) AS hour_time, device_id, avg(temperature) AS avg_temp @@ -180,7 +173,7 @@ WHERE time >= 2024-11-28 07:00:00 AND time <= 2024-11-28 16:00:00 GROUP BY 1, device_id; ``` -Result: +**Result:** ```Plain +-----------------------------+---------+--------+ @@ -199,7 +192,7 @@ Result: +-----------------------------+---------+--------+ ``` -Example 3: Empty Result Set for No Data in Range +**Example 3: Empty Result Set for No Data in Range** ```SQL SELECT date_bin_gapfill(1h, time) AS hour_time, device_id, avg(temperature) AS avg_temp @@ -208,7 +201,7 @@ WHERE time >= 2024-11-27 09:00:00 AND time <= 2024-11-27 14:00:00 GROUP BY 1, device_id; ``` -Result: +**Result:** ```Plain +---------+---------+--------+ @@ -217,41 +210,41 @@ Result: +---------+---------+--------+ ``` -### 2. DIFF Function +## 2. `DIFF` Function -##### Description: +### 2.1 **Description:** -The `DIFF` function calculates the difference between the current row and the previous row. For the first row, it returns `NULL` since there is no previous row. +- The `DIFF` function calculates the difference between the current row and the previous row. For the first row, it returns `NULL` since there is no previous row. -##### Function Definition: +### 2.2 **Function Definition:** ``` DIFF(numberic[, boolean]) -> Double ``` -##### Parameters +### 2.3 **Parameters:** -- First Parameter (numeric): +#### **First Parameter (numeric):** - - **Type**: Must be numeric (`INT32`, `INT64`, `FLOAT`, `DOUBLE`). - - **Purpose**: Specifies the column for which to calculate the difference. +- **Type**: Must be numeric (`INT32`, `INT64`, `FLOAT`, `DOUBLE`). +- **Purpose**: Specifies the column for which to calculate the difference. -- Second Parameter (boolean, optional): +#### **Second Parameter (boolean, optional):** - - **Type**: Boolean (`true` or `false`). - - **Default**: `true`. - - **Purpose**: - - `true`: Ignores `NULL` values and uses the first non-`NULL` value for calculation. If no non-`NULL` value exists, returns `NULL`. - - `false`: Does not ignore `NULL` values. If the previous row is `NULL`, the result is `NULL`. +- **Type**: Boolean (`true` or `false`). +- **Default**: `true`. +- **Purpose**: + - `true`: Ignores `NULL` values and uses the first non-`NULL` value for calculation. If no non-`NULL` value exists, returns `NULL`. + - `false`: Does not ignore `NULL` values. If the previous row is `NULL`, the result is `NULL`. -##### Notes: +### 2.4 **Notes:** - In **tree models**, the second parameter must be specified as `'ignoreNull'='true'` or `'ignoreNull'='false'`. - In **table models**, simply use `true` or `false`. Using `'ignoreNull'='true'` or `'ignoreNull'='false'` in table models results in a string comparison and always evaluates to `false`. -##### Usage Examples +### 2.5 **Usage** **Examples****:** -**Example 1: Ignore NULL Values** +#### **Example 1: Ignore NULL Values** ```SQL SELECT time, DIFF(temperature) AS diff_temp @@ -259,7 +252,7 @@ FROM table1 WHERE device_id = '100'; ``` -Result: +**Result:** ```Plain +-----------------------------+---------+ @@ -276,7 +269,7 @@ Result: +-----------------------------+---------+ ``` -Example 2: Do Not Ignore NULL Values +#### **Example 2: Do Not Ignore NULL Values** ```SQL SELECT time, DIFF(temperature, false) AS diff_temp @@ -284,7 +277,7 @@ FROM table1 WHERE device_id = '100'; ``` -Result: +**Result:** ```Plain +-----------------------------+---------+ @@ -301,7 +294,7 @@ Result: +-----------------------------+---------+ ``` -Example 3: Full Example +#### **Example 3: Full Example** ```SQL SELECT time, temperature, @@ -311,7 +304,7 @@ FROM table1 WHERE device_id = '100'; ``` -Result: +**Result:** ```Plain +-----------------------------+-----------+-----------+-----------+ @@ -326,4 +319,4 @@ Result: |2024-11-26T13:37:00.000+08:00| 90.0| 2.0| 2.0| |2024-11-26T13:38:00.000+08:00| 90.0| 0.0| 0.0| +-----------------------------+-----------+-----------+-----------+ -``` +``` \ No newline at end of file diff --git a/src/UserGuide/latest-Table/SQL-Manual/Fill-Clause.md b/src/UserGuide/latest-Table/SQL-Manual/Fill-Clause.md index a708cc763..bf745bd7a 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/Fill-Clause.md +++ b/src/UserGuide/latest-Table/SQL-Manual/Fill-Clause.md @@ -22,14 +22,14 @@ # FILL Clause -## 1 Function Introduction +## 1. Function Introduction During data queries, you may encounter scenarios where certain columns have missing data in some rows, resulting in NULL values in the result set. These NULL values can hinder data visualization and analysis. To address this, IoTDB provides the FILL clause to populate these NULL values. - If the query includes an `ORDER BY` clause, the FILL clause is executed before `ORDER BY`. - If a `GAPFILL` (e.g., `date_bin_gapfill` function) operation exists, the FILL clause is executed after `GAPFILL`. -## 2 Syntax Overview +## 2. Syntax Overview ```sql @@ -91,7 +91,7 @@ Only one filling method can be specified, and it applies to all columns in the r **Note:** Columns with data types not supporting the specified filling method will remain unchanged without errors. -## 3 Sample Dataset +## 3. Sample Dataset The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. @@ -313,7 +313,7 @@ Total line number = 7 It costs 0.073s ``` -## 4 Advanced Usage +## 4. Advanced Usage When using the `PREVIOUS` or `LINEAR` FILL methods, the `FILL_GROUP` parameter allows filling within specific groups without being influenced by other groups. @@ -410,7 +410,7 @@ Total line number = 8 It costs 0.089s ``` -## 5 Special Notes +## 5. Special Notes When using `LINEAR` or `PREVIOUS` FILL methods, if the auxiliary time column (used to determine filling logic) contains NULL values, IoTDB follows these rules: diff --git a/src/UserGuide/latest-Table/SQL-Manual/From-Join-Clause.md b/src/UserGuide/latest-Table/SQL-Manual/From-Join-Clause.md index e561a9e03..06c1835b1 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/From-Join-Clause.md +++ b/src/UserGuide/latest-Table/SQL-Manual/From-Join-Clause.md @@ -21,7 +21,7 @@ # FROM & JOIN Clause -## 1 Syntax Overview +## 1. Syntax Overview ```sql FROM relation (',' relation)* @@ -60,11 +60,11 @@ qualifiedName ; ``` -## 2 FROM Clause Syntax +## 2. FROM Clause Syntax The `FROM` clause specifies the data sources for the query. Logically, query execution begins with the `FROM` clause. It can include a single table, a combination of multiple tables joined using `JOIN` clauses, or a subquery containing another `SELECT` query. -## 3 JOIN Clause +## 3. JOIN Clause The `JOIN` clause combines two tables based on specific conditions, typically predicates, but other implicit rules can also apply. @@ -120,7 +120,7 @@ An **outer join** returns rows even when no matching records exist in the other IoTDB currently supports only `FULL [OUTER] JOIN`. This type returns all records from both tables. If a record in one table has no match in the other, `NULL` values are returned for the unmatched fields. `FULL JOIN` **must use explicit join conditions**. -## 4 Example Queries +## 4. Example Queries The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/latest-Table/SQL-Manual/GroupBy-Clause.md b/src/UserGuide/latest-Table/SQL-Manual/GroupBy-Clause.md index 6522f34eb..082ab52c5 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/GroupBy-Clause.md +++ b/src/UserGuide/latest-Table/SQL-Manual/GroupBy-Clause.md @@ -21,7 +21,7 @@ # GROUP BY Clause -## 1 Syntax Overview +## 1. Syntax Overview ```sql GROUP BY expression (',' expression)* @@ -32,7 +32,7 @@ GROUP BY expression (',' expression)* ![](/img/groupby01.png) -## 2 Notes +## 2. Notes #### 2.1 Items in the `SELECT` Clause @@ -209,7 +209,7 @@ Total line number = 1 It costs 0.047s ``` -## 3 Sample Data and Usage Examples +## 3. Sample Data and Usage Examples The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/latest-Table/SQL-Manual/Having-Clause.md b/src/UserGuide/latest-Table/SQL-Manual/Having-Clause.md index 8b2b68afe..72f921b2a 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/Having-Clause.md +++ b/src/UserGuide/latest-Table/SQL-Manual/Having-Clause.md @@ -21,7 +21,7 @@ # HAVING Clause -## 1 Syntax Overview +## 1. Syntax Overview ```sql HAVING booleanExpression @@ -36,7 +36,7 @@ The `HAVING` clause is used to filter aggregated results after a `GROUP BY` oper In terms of syntax, the `HAVING` clause is similar to the `WHERE` clause. However, while `WHERE` filters rows before grouping and aggregation, `HAVING` filters the results after grouping and aggregation. -## 2 Sample Data and Usage Examples +## 2. Sample Data and Usage Examples The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/latest-Table/SQL-Manual/Identifier.md b/src/UserGuide/latest-Table/SQL-Manual/Identifier.md index 782fecf47..cd695a6cf 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/Identifier.md +++ b/src/UserGuide/latest-Table/SQL-Manual/Identifier.md @@ -23,7 +23,7 @@ In IoTDB, identifiers are used to represent the names of databases, tables, columns, functions, and other objects. -## 1 Naming Rules +## 1. Naming Rules 1. **Starting Character**: An identifier must begin with a letter. 2. **Subsequent Characters**: Identifiers can include letters, digits, and underscores. @@ -50,7 +50,7 @@ table-name // contains a hyphen colum$name@field // contains special characters and is not enclosed in double quotes ``` -## 2 Case Sensitivity +## 2. Case Sensitivity Identifiers in IoTDB are case-insensitive. The system does not preserve the original case of identifiers during storage, but query results display column names in the same case as specified in the SELECT clause of the query. diff --git a/src/UserGuide/latest-Table/SQL-Manual/Limit-Offset-Clause.md b/src/UserGuide/latest-Table/SQL-Manual/Limit-Offset-Clause.md index 9a321e361..6a803f6ef 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/Limit-Offset-Clause.md +++ b/src/UserGuide/latest-Table/SQL-Manual/Limit-Offset-Clause.md @@ -21,7 +21,7 @@ # LIMIT & OFFSET Clause -## 1 Syntax Overview +## 1. Syntax Overview ```sql OFFSET INTEGER_VALUE LIMIT INTEGER_VALUE @@ -46,7 +46,7 @@ The `OFFSET` clause works in conjunction with the `LIMIT` clause to skip a speci - If the total number of rows (`n`) is greater than or equal to the sum of `OFFSET` and `LIMIT`, the query returns `LIMIT` rows. - If the total number of rows (`n`) is less than the sum of `OFFSET` and `LIMIT`, the query returns rows from `OFFSET` to the end of the dataset, up to a maximum of `n - OFFSET`. -## 2 Sample Data and Usage Examples +## 2. Sample Data and Usage Examples The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/latest-Table/SQL-Manual/OrderBy-Clause.md b/src/UserGuide/latest-Table/SQL-Manual/OrderBy-Clause.md index 347e4cfab..a9348f990 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/OrderBy-Clause.md +++ b/src/UserGuide/latest-Table/SQL-Manual/OrderBy-Clause.md @@ -23,7 +23,7 @@ The `ORDER BY` clause is used to sort the result set of a query at its final stage based on specified sorting conditions. -## 1 Syntax Overview +## 1. Syntax Overview ```sql ORDER BY sortItem (',' sortItem)* @@ -40,7 +40,7 @@ sortItem - By default, sorting is applied as `ASC NULLS LAST`, meaning values are sorted in ascending order and `NULL` values are placed at the end. Users can manually specify other parameters to override the default behavior. - The `ORDER BY` clause is executed before the `LIMIT` or `OFFSET` clauses. -## 2 Example Data +## 2. Example Data The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/latest-Table/SQL-Manual/Select-Clause.md b/src/UserGuide/latest-Table/SQL-Manual/Select-Clause.md index 32018c2ad..5d940d4d1 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/Select-Clause.md +++ b/src/UserGuide/latest-Table/SQL-Manual/Select-Clause.md @@ -23,7 +23,7 @@ **SELECT Clause** specifies the columns included in the query results. -## 1 Syntax Overview +## 1. Syntax Overview ```sql SELECT selectItem (',' selectItem)* @@ -37,7 +37,7 @@ selectItem - It supports aggregate functions (e.g., `SUM`, `AVG`, `COUNT`) and window functions, logically executed last in the query process. -## 2 Detailed Syntax: +## 2. Detailed Syntax: Each `selectItem` can take one of the following forms: @@ -46,7 +46,7 @@ Each `selectItem` can take one of the following forms: 3. **All Columns in the Result Set**: `*` selects all columns returned by the query. Column aliases are not allowed. -## 3 Example Data +## 3. Example Data The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. @@ -250,7 +250,7 @@ Total line number = 18 It costs 0.189s ``` -## 4 Column Order in the Result Set +## 4. Column Order in the Result Set - **Column Order**: The order of columns in the result set matches the order specified in the `SELECT` clause. - **Multi-column Expressions**: If a selection expression produces multiple columns, their order follows the order in the source relation.p. \ No newline at end of file diff --git a/src/UserGuide/latest-Table/SQL-Manual/Where-Clause.md b/src/UserGuide/latest-Table/SQL-Manual/Where-Clause.md index 630f36277..200f73d0f 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/Where-Clause.md +++ b/src/UserGuide/latest-Table/SQL-Manual/Where-Clause.md @@ -21,7 +21,7 @@ # WHERE Clauses -## 1 Syntax Overview +## 1. Syntax Overview ```sql WHERE booleanExpression @@ -29,7 +29,7 @@ WHERE booleanExpression The `WHERE` clause is used to specify filter conditions in an SQL query. It is executed immediately after the `FROM` clause. -## 2 Example Data +## 2. Example Data The [Example Data page](../Reference/Sample-Data.md)page provides SQL statements to construct table schemas and insert data. By downloading and executing these statements in the IoTDB CLI, you can import the data into IoTDB. This data can be used to test and run the example SQL queries included in this documentation, allowing you to reproduce the described results. diff --git a/src/UserGuide/latest-Table/SQL-Manual/overview.md b/src/UserGuide/latest-Table/SQL-Manual/overview.md index 89bc8cd65..0ef5cbc2e 100644 --- a/src/UserGuide/latest-Table/SQL-Manual/overview.md +++ b/src/UserGuide/latest-Table/SQL-Manual/overview.md @@ -21,7 +21,7 @@ # Overview -## 1 Syntax Overview +## 1. Syntax Overview ```SQL SELECT ⟨select_list⟩ diff --git a/src/UserGuide/latest-Table/Technical-Insider/Cluster-data-partitioning.md b/src/UserGuide/latest-Table/Technical-Insider/Cluster-data-partitioning.md index 2a3f54fe7..f9f37e622 100644 --- a/src/UserGuide/latest-Table/Technical-Insider/Cluster-data-partitioning.md +++ b/src/UserGuide/latest-Table/Technical-Insider/Cluster-data-partitioning.md @@ -18,25 +18,25 @@ under the License. --> - +# Partitioning and Load Balance This document introduces the partitioning strategies and load balance strategies in IoTDB. According to the characteristics of time series data, IoTDB partitions them by series and time dimensions. Combining a series partition with a time partition creates a partition, the unit of division. To enhance throughput and reduce management costs, these partitions are evenly allocated to RegionGroups, which serve as the unit of replication. The RegionGroup's Regions then determine the storage location, with the leader Region managing the primary load. During this process, the Region placement strategy determines which nodes will host the replicas, while the leader selection strategy designates which Region will act as the leader. -### Partitioning Strategy and Partition Allocation +## 1. Partitioning Strategy and Partition Allocation IoTDB implements a tailored partitioning algorithm for time-series data. Based on this, the partition information cached on the ConfigNode and DataNode is not only easy to manage but also clearly distinguishes between hot and cold data. Subsequently, balanced partitions are evenly distributed across the RegionGroups in the cluster to achieve storage balance. -#### Partitioning Strategy +### 1.1 Partitioning Strategy IoTDB maps each sensor in a production environment to a time series. It then uses a **series** **partitioning algorithm** to partition the time series for schema management and a **time partitioning algorithm** to manage the data. The figure below illustrates how IoTDB partitions time-series data. ![](/img/partition_table_en.png) -##### Partitioning Algorithms +#### Partitioning Algorithms Since a large number of devices and sensors are typically deployed in production environments, IoTDB uses a series partitioning algorithm to ensure that the size of partition information remains manageable. As the generated time series are associated with timestamps, IoTDB uses a time partitioning algorithm to clearly distinguish between hot and cold partitions. -###### Series Partitioning Algorithm +##### Series Partitioning Algorithm By default, IoTDB limits the number of series partitions to 1,000 and configures the series partitioning algorithm as a **hash partitioning algorithm**. This provides the following benefits: @@ -45,7 +45,7 @@ By default, IoTDB limits the number of series partitions to 1,000 and configures Furthermore, if the actual load in the production environment can be estimated more accurately, the sequence partitioning algorithm can be configured as a custom hash or list partitioning algorithm to achieve a more uniform load distribution across all sequence partitions. -###### Time Partitioning Algorithm +##### Time Partitioning Algorithm The time partitioning algorithm converts a given timestamp into the corresponding time partition using the following formula: @@ -53,21 +53,21 @@ $$\left\lfloor\frac{\text{Timestamp} - \text{StartTimestamp}}{\text{TimePartitio In this formula, $\text{StartTimestamp}$ and $\text{TimePartitionInterval}$ are configurable parameters to adapt to different production environments. $\text{StartTimestamp}$ represents the start time of the first time partition, while $\text{TimePartitionInterval}$ defines the duration of each time partition. By default, $\text{TimePartitionInterval}$ is set to seven days. -##### Schema Partitioning +#### Schema Partitioning Since the series partitioning algorithm evenly partitions the time series, each series partition corresponds to a schema partition. These schema partitions are then evenly distributed across **SchemaRegionGroups** to achieve balanced schema distribution. -##### Data Partitioning +#### Data Partitioning Data partitions are created by combining series partitions and time partitions. Since the series partitioning algorithm evenly partitions the time series, the load of data partitions within a specific time partition remains balanced. These data partitions are then evenly distributed across **DataRegionGroups** to achieve balanced data distribution. -#### Partition Allocation +### 1.2 Partition Allocation IoTDB uses RegionGroups to achieve elastic storage for time-series data. The number of RegionGroups in the cluster is determined by the total resources of all DataNodes. Since the number of RegionGroups is dynamic, IoTDB can easily scale. Both SchemaRegionGroups and DataRegionGroups follow the same partition allocation algorithm, which evenly divides all series partitions. The figure below illustrates the partition allocation process, where dynamically expanding RegionGroups match the continuously expanding time series and cluster. ![](/img/partition_allocation_en.png) -##### RegionGroup Expansion +#### RegionGroup Expansion The number of RegionGroups is given by the following formula: @@ -75,17 +75,17 @@ $$\text{RegionGroupNumber} = \left\lfloor\frac{\sum_{i=1}^{\text{DataNodeNumber} In this formula, $\text{RegionNumber}_i$ represents the number of Regions expected to be hosted on the $i$-th DataNode, and $\text{ReplicationFactor}$ denotes the number of Regions within each RegionGroup. Both $\text{RegionNumber}_i$ and $\text{ReplicationFactor}$ are configurable parameters. $\text{RegionNumber}_i$ can be determined based on the available hardware resources (e.g., CPU cores, memory size) on the $i$-th DataNode to adapt to different physical servers. $\text{ReplicationFactor}$ can be adjusted to ensure different levels of fault tolerance. -##### Allocation Strategy +#### Allocation Strategy Both the SchemaRegionGroup and the DataRegionGroup follow the same allocation algorithm--splitting all series partitions evenly. As a result, each SchemaRegionGroup holds the same number of schema partitions, ensuring balanced schema storage. Similarly, for each time partition, each DataRegionGroup acquires the data partitions corresponding to the series partitions it holds. Consequently, the data partitions within a time partition are evenly distributed across all DataRegionGroups, ensuring balanced data storage in each time partition. Notably, IoTDB effectively leverages the characteristics of time series data. When the TTL (Time to Live) is configured, IoTDB enables migration-free elastic storage for time series data. This feature facilitates cluster expansion while minimizing the impact on online operations. The figures above illustrate an instance of this feature: newborn data partitions are evenly allocated to each DataRegion, and expired data are automatically archived. As a result, the cluster's storage will eventually remain balanced. -### Load Balancing Strategies +## 2. Load Balancing Strategies To improve cluster availability and performance, IoTDB employs carefully designed storage balancing and computation balancing algorithms. -#### Storage Balancing +### 2.1 Storage Balancing The number of Regions held by a DataNode reflects its storage load. If the number of Regions varies significantly between DataNodes, the DataNode with more Regions may become a storage bottleneck. Although a simple Round Robin placement algorithm can achieve storage balancing by ensuring each DataNode holds an equal number of Regions, it reduces the cluster's fault tolerance, as shown below: @@ -101,7 +101,7 @@ In this scenario, if DataNode $n_2$ fails, the load previously handled by DataN To address this issue, IoTDB employs a Region placement algorithm that not only evenly distributes Regions across all DataNodes but also ensures that each DataNode can offload its storage to sufficient other DataNodes in the event of a failure. As a result, the cluster achieves balanced storage distribution and a high level of fault tolerance, ensuring its availability. -#### Computation Balancing +### 2.2 Computation Balancing The number of leader Regions held by a DataNode reflects its Computing load. If the difference in the number of leaders across DataNodes is relatively large, the DataNode with more leaders is likely to become a Computing bottleneck. If the leader selection process is conducted using a transparent Greedy algorithm, the result may be an unbalanced leader distribution when the Regions are fault-tolerantly placed, as demonstrated below: @@ -117,7 +117,7 @@ Note that the above steps strictly follow the Greedy algorithm. However, by step To address this issue, IoTDB adopts a **leader selection algorithm** that continuously balances the distribution of leader across the cluster. As a result, the cluster achieves balanced computation load distribution, ensuring its performance. -### Source Code +## 3. Source Code - [Data Partitioning](https://github.com/apache/iotdb/tree/master/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition) - [Partition Allocation](https://github.com/apache/iotdb/tree/master/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition) diff --git a/src/UserGuide/latest-Table/Technical-Insider/Encoding-and-Compression.md b/src/UserGuide/latest-Table/Technical-Insider/Encoding-and-Compression.md index d1546bead..fedf3c03e 100644 --- a/src/UserGuide/latest-Table/Technical-Insider/Encoding-and-Compression.md +++ b/src/UserGuide/latest-Table/Technical-Insider/Encoding-and-Compression.md @@ -18,10 +18,11 @@ under the License. --> +# Encoding and Compression IoTDB employs various encoding and compression techniques to enhance storage efficiency and reduce I/O operations during data writing and reading. Below is a detailed explanation of the supported encoding and compression methods. -## **Encoding Methods** +## 1. **Encoding Methods** IoTDB supports multiple encoding methods tailored for different data types to optimize storage and performance. @@ -77,7 +78,7 @@ A lossless encoding method combining prediction, ZigZag encoding, bit packing, a A lossless encoding method combining differential encoding, bit packing, run-length encoding, Fibonacci encoding, and concatenation. It is suitable for time-series data with a small and steadily increasing trend but is not effective for highly fluctuating data. -### **Data Types and Supported Encoding Methods** +#### **Data Types and Supported Encoding Methods** The following table summarizes the recommended and supported encoding methods for each data type: @@ -101,11 +102,11 @@ IoTDB> create timeseries root.ln.wf02.wt02.status WITH DATATYPE=BOOLEAN, ENCODIN Msg: 507: encoding TS_2DIFF does not support BOOLEAN ``` -## **Compression Methods** +## 2. **Compression Methods** When the time series is written and encoded as binary data according to the specified type, IoTDB applies compression techniques to further enhance storage efficiency. While both encoding and compression aim to optimize storage, encoding techniques are typically designed for specific data types (e.g., second-order differential encoding is only suitable for INT32 or INT64, and storing floating-point numbers requires multiplying them by 10ⁿ to convert them into integers) before converting the data into a binary stream. Compression methods like SNAPPY operate on the binary stream, making them independent of the data type. -### **Supported Compression Methods** +### 2.1 **Supported Compression Methods** IoTDB allows specifying the compression method of a column when creating a time series. Currently, IoTDB supports the following compression methods: @@ -116,7 +117,7 @@ IoTDB allows specifying the compression method of a column when creating a time - ZSTD - LZMA2 -### **Compression Ratio Statistics** +### 2.2 **Compression Ratio Statistics** IoTDB provides compression ratio statistics to monitor the effectiveness of compression. The statistics are stored in:`data/datanode/system/compression_ratio` diff --git a/src/UserGuide/latest-Table/Tools-System/Benchmark.md b/src/UserGuide/latest-Table/Tools-System/Benchmark.md index b46184f7d..af31651f4 100644 --- a/src/UserGuide/latest-Table/Tools-System/Benchmark.md +++ b/src/UserGuide/latest-Table/Tools-System/Benchmark.md @@ -18,8 +18,9 @@ under the License. --> +# Benchmark -## **Basic Overview** +## 1. **Basic Overview** IoT-benchmark is a time-series database benchmarking tool developed in Java for big data environments. It was developed and open-sourced by the School of Software, Tsinghua University. The tool is user-friendly, supports various write and query methods, allows storing test information and results for further queries or analysis, and integrates with Tableau for visualizing test results. @@ -50,7 +51,7 @@ Currently, IoT-benchmark supports the following time series databases, versions | KairosDB | -- | HTTP Request | | IoTDB | v2.0 v1.x v0.13 | JDBC, SessionByTablet, SessionByRecord, SessionByRecords | -## **Installation and Operation** +## 2. **Installation and Operation** #### **Prerequisites** @@ -144,7 +145,7 @@ All test log files are stored in the `logs` folder, while test results are saved - MIN: Minimum operation latency. - Pn: Quantile values of the overall operation distribution (e.g., P25 represents the 25th percentile, or lower quartile). -## **Main** **Parameters** +## 3. **Main** **Parameters** #### IoTDB Service Model @@ -352,7 +353,7 @@ Then the test process with 3 LOOP parameters of 10, 20, and 50 is executed in se > tail -f log_info.log ``` -## Test Example +## 4. Test Example This example demonstrates how to configure and run an IoT-benchmark test with IoTDB 2.0 using the table model for writing and querying. diff --git a/src/UserGuide/latest-Table/Tools-System/CLI.md b/src/UserGuide/latest-Table/Tools-System/CLI.md index 9b5db7a7a..f83d8759d 100644 --- a/src/UserGuide/latest-Table/Tools-System/CLI.md +++ b/src/UserGuide/latest-Table/Tools-System/CLI.md @@ -18,12 +18,13 @@ under the License. --> +# CLI The IoTDB Command Line Interface (CLI) tool allows users to interact with the IoTDB server. Before using the CLI tool to connect to IoTDB, ensure that the IoTDB service is running correctly. This document explains how to launch the CLI and its related parameters. In this manual, `$IOTDB_HOME` represents the installation directory of IoTDB. -### CLI Launch +## 1. CLI Launch The CLI client script is located in the `$IOTDB_HOME/sbin` directory. The common commands to start the CLI tool are as follows: @@ -62,9 +63,9 @@ The figure below indicates a successful startup: ![](/img/Cli-01.png) -### Example Commands +## 2. Example Commands -#### **Create a Database** +### 2.1 **Create a Database** ```Java create database test @@ -73,7 +74,7 @@ create database test ![](/img/Cli-02.png) -#### **Show Databases** +### 2.2 **Show Databases** ```Java show databases ``` @@ -81,11 +82,11 @@ show databases ![](/img/Cli-03.png) -### CLI Exit +## 3. CLI Exit To exit the CLI and terminate the session, type`quit`or`exit`. -### Additional Notes and Shortcuts +### 3.1 Additional Notes and Shortcuts 1. **Navigate Command History:** Use the up and down arrow keys. 2. **Auto-Complete Commands:** Use the right arrow key. diff --git a/src/UserGuide/latest-Table/Tools-System/Maintenance-Tool_apache.md b/src/UserGuide/latest-Table/Tools-System/Maintenance-Tool_apache.md index 1194c7883..fdcdbdc9e 100644 --- a/src/UserGuide/latest-Table/Tools-System/Maintenance-Tool_apache.md +++ b/src/UserGuide/latest-Table/Tools-System/Maintenance-Tool_apache.md @@ -21,11 +21,11 @@ # Cluster Management Tools -## Data Directory Overview Tool +## 1. Data Directory Overview Tool The IoTDB data directory overview tool is designed to print out the structural overview information of the data directory. The tool is located at `tools/tsfile/print-iotdb-data-dir`. -### Usage +### 1.1 Usage - **Windows:** @@ -41,7 +41,7 @@ The IoTDB data directory overview tool is designed to print out the structural o **Note:** If the output result storage path is not set, the relative path `"IoTDB_data_dir_overview.txt"` will be used as the default. -### Example +### 1.2 Example Taking Windows system as an example: @@ -82,11 +82,11 @@ data dir num: 1 |============================================================== ````````````````````````` -## TsFile Overview Tool +## 2. TsFile Overview Tool The TsFile overview tool is used to print the content of a TsFile in a sketch mode. The tool is located at `tools/tsfile/print-tsfile`. -### Usage +### 2.1 Usage - **Windows:** @@ -102,7 +102,7 @@ The TsFile overview tool is used to print the content of a TsFile in a sketch mo **Note:** If the output result storage path is not set, the relative path `"TsFile_sketch_view.txt"` will be used as the default. -### Example +### 2.2 Example Taking Windows system as an example: @@ -170,11 +170,11 @@ file length: 2974 - The "|||||||||||||||||||||" is added for enhanced readability and is not actual data stored in the TsFile. - The final printed "IndexOfTimerseriesIndex Tree" is a reorganized print of the metadata index tree at the end of the TsFile for intuitive understanding and is not the actual data stored in the TsFile. -## TsFile Resource Overview Tool +## 3. TsFile Resource Overview Tool The TsFile resource overview tool is used to print out the content of TsFile resource files. The tool is located at `tools/tsfile/print-tsfile-resource-files`. -### Usage +### 3.1 Usage - **Windows:** @@ -188,7 +188,7 @@ The TsFile resource overview tool is used to print out the content of TsFile res ./print-tsfile-resource-files.sh ``` -### Example +### 3.2 Example Taking Windows system as an example: diff --git a/src/UserGuide/latest-Table/Tools-System/Maintenance-Tool_timecho.md b/src/UserGuide/latest-Table/Tools-System/Maintenance-Tool_timecho.md index 0c60ab937..f16c251c2 100644 --- a/src/UserGuide/latest-Table/Tools-System/Maintenance-Tool_timecho.md +++ b/src/UserGuide/latest-Table/Tools-System/Maintenance-Tool_timecho.md @@ -18,14 +18,15 @@ under the License. --> +# Maintenance Tool -## IoTDB-OpsKit +## 1. IoTDB-OpsKit The IoTDB OpsKit is an easy-to-use operation and maintenance tool designed for TimechoDB (Enterprise-grade product based on Apache IoTDB). It helps address the operational and maintenance challenges of multi-node distributed IoTDB deployments by providing functionalities such as cluster deployment, start/stop management, elastic scaling, configuration updates, and data export. With one-click command execution, it simplifies the management of complex database clusters and significantly reduces operational complexity. This document provides guidance on remotely deploying, configuring, starting, and stopping IoTDB cluster instances using the cluster management tool. -### Prerequisites +### 1.1 Prerequisites The IoTDB OpsKit requires GLIBC 2.17 or later, which means the minimum supported operating system version is CentOS 7. The target machines for IoTDB deployment must have the following dependencies installed: @@ -38,7 +39,7 @@ If any of these dependencies are missing, please install them manually. The last > **Note:** The IoTDB cluster management tool requires **root privileges** to execute. -### Deployment +### 1.2 Deployment #### Download and Installation @@ -64,7 +65,7 @@ iotdbctl cluster check example /sbin/iotdbctl cluster check example ``` -### Cluster Configuration Files +### 1.3 Cluster Configuration Files The cluster configuration files are stored in the `iotdbctl/config` directory as YAML files. @@ -192,7 +193,7 @@ If metrics are enabled in `iotdb-system.properties` (in `config/xxx.yaml`), the - **Handling Special Characters in YAML Keys**: If a YAML key value contains special characters (such as `:`), it is recommended to enclose the entire value in double quotes (`""`). - **Avoid Spaces in File Paths**: Paths containing spaces may cause parsing errors in some configurations. -### Usage Scenarios +### 1.4 Usage Scenarios #### Data Cleanup @@ -346,7 +347,7 @@ iotdbctl cluster start default_cluster For detailed parameters, refer to the **Cluster Configuration Files** section above. -### Command Reference +### 1.5 Command Reference The basic command structure is: @@ -392,7 +393,7 @@ iotdbctl cluster deploy default_cluster | importschema | Import metadata. | Cluster name,-N nodename -param paramters | | exportschema | Export metadata. | Cluster name,-N nodename -param paramters | -### Detailed Command Execution Process +### 1.6 Detailed Command Execution Process The following examples use `default_cluster.yaml` as a reference. Users can modify the commands according to their specific cluster configuration files. @@ -935,7 +936,7 @@ iotdbctl cluster exportschema default_cluster -N datanode1 -param "-t ./ -pf ./p | -lpf | Specify the maximum number of lines per exported file (Default: 10,000). | NO | | -timeout | Specify the session query timeout in milliseconds. | NO | -### Introduction to Cluster Deployment Tool Samples +### 1.7 Introduction to Cluster Deployment Tool Samples In the cluster deployment tool installation directory (config/example), there are three YAML configuration examples. If needed, you can copy and modify them for your deployment. @@ -945,11 +946,11 @@ In the cluster deployment tool installation directory (config/example), there ar | default_3c3d.yaml | Example configuration for 3 ConfigNodes and 3 DataNodes. | | default_3c3d_grafa_prome | Example configuration for 3 ConfigNodes, 3 DataNodes, Grafana, and Prometheus. | -## IoTDB Data Directory Overview Tool +## 2. IoTDB Data Directory Overview Tool The IoTDB Data Directory Overview Tool provides an overview of the IoTDB data directory structure. It is located at `tools/tsfile/print-iotdb-data-dir`. -### Usage +### 2.1 Usage - For Windows: @@ -965,7 +966,7 @@ The IoTDB Data Directory Overview Tool provides an overview of the IoTDB data di **Note:** If the output path is not specified, the default relative path `IoTDB_data_dir_overview.txt` will be used. -### Example +### 2.2 Example Use Windows in this example: @@ -1006,11 +1007,11 @@ data dir num:1 |============================================================== ~~~ -## TsFile Sketch Tool +## 3. TsFile Sketch Tool The TsFile Sketch Tool provides a summarized view of the content within a TsFile. It is located at `tools/tsfile/print-tsfile`. -### Usage +### 3.1 Usage - For Windows: @@ -1026,7 +1027,7 @@ The TsFile Sketch Tool provides a summarized view of the content within a TsFile **Note:** If the output path is not specified, the default relative path `TsFile_sketch_view.txt` will be used. -### Example +### 3.2 Example Use Windows in this example: @@ -1094,11 +1095,11 @@ Explanations: - The `"||||||||||||||||||||"` lines are added for readability and are not part of the actual TsFile data. - The final `"IndexOfTimerseriesIndex Tree"` section reorganizes the metadata index tree at the end of the TsFile. This view aids understanding but does not represent actual stored data. -## TsFile Resource Sketch Tool +## 4. TsFile Resource Sketch Tool The TsFile Resource Sketch Tool displays details about TsFile resource files. It is located at `tools/tsfile/print-tsfile-resource-files`. -### Usage +### 4.1 Usage - For Windows: @@ -1112,7 +1113,7 @@ The TsFile Resource Sketch Tool displays details about TsFile resource files. It ./print-tsfile-resource-files.sh ``` -### Example +### 4.2 Example Use Windows in this example: diff --git a/src/UserGuide/latest-Table/Tools-System/Monitor-Tool_apache.md b/src/UserGuide/latest-Table/Tools-System/Monitor-Tool_apache.md index 5e29a0fa1..77a5f9bde 100644 --- a/src/UserGuide/latest-Table/Tools-System/Monitor-Tool_apache.md +++ b/src/UserGuide/latest-Table/Tools-System/Monitor-Tool_apache.md @@ -23,7 +23,7 @@ The deployment of monitoring tools can be referenced in the document [Monitoring Panel Deployment](../Deployment-and-Maintenance/Monitoring-panel-deployment.md) chapter. -## Prometheus Mapping Relationship for Monitoring Metrics +## 1. Prometheus Mapping Relationship for Monitoring Metrics > For a monitoring metric with Metric Name as `name`, Tags as `K1=V1, ..., Kn=Vn`, the following mapping applies, where `value` is the specific value. @@ -35,7 +35,7 @@ The deployment of monitoring tools can be referenced in the document [Monitoring | Rate | `name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn"} value`
`name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", rate="m1"} value`
`name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", rate="m5"} value`
`name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", rate="m15"} value`
`name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", rate="mean"} value` | | Timer | `name_seconds_max{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn"} value`
`name_seconds_sum{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn"} value`
`name_seconds_count{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn"} value`
`name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", quantile="0.5"} value`
`name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId",k1="V1" , ..., Kn="Vn", quantile="0.99"} value` | -## Modifying Configuration Files +## 2. Modifying Configuration Files 1) Taking DataNode as an example, modify the `iotdb-system.properties` configuration file as follows: @@ -59,7 +59,7 @@ file_count{name="seq",} 2.0 ... ``` -## Prometheus + Grafana +## 3. Prometheus + Grafana As shown above, IoTDB exposes monitoring metrics in the standard Prometheus format. You can use Prometheus to collect and store these metrics and Grafana to visualize them. @@ -97,7 +97,7 @@ For more details, refer to the following documents: - [Grafana Installation and Usage Documentation](https://grafana.com/docs/grafana/latest/getting-started/getting-started/) - [Grafana Querying Data from Prometheus and Plotting Documentation](https://prometheus.io/docs/visualization/grafana/#grafana-support-for-prometheus) -## Apache IoTDB Dashboard +## 4. Apache IoTDB Dashboard The `Apache IoTDB Dashboard` is a companion product of IoTDB Enterprise Edition, supporting unified centralized operation and maintenance management. It allows monitoring multiple clusters through a single monitoring panel. You can contact the business team to obtain the Dashboard's JSON file. @@ -105,7 +105,7 @@ The `Apache IoTDB Dashboard` is a companion product of IoTDB Enterprise Edition, ![Apache IoTDB Dashboard](/img/%E7%9B%91%E6%8E%A7%20cluster2.png) -### Cluster Overview +### 4.1 Cluster Overview You can monitor, but not limited to: @@ -118,7 +118,7 @@ You can monitor, but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E6%A6%82%E8%A7%88.png) -### Data Writing +### 4.2 Data Writing You can monitor, but not limited to: @@ -128,7 +128,7 @@ You can monitor, but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E5%86%99%E5%85%A5.png) -### Data Query +### 4.3 Data Query You can monitor, but not limited to: @@ -142,7 +142,7 @@ You can monitor, but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E6%9F%A5%E8%AF%A2.png) -### Storage Engine +### 4.4 Storage Engine You can monitor, but not limited to: @@ -152,7 +152,7 @@ You can monitor, but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E5%AD%98%E5%82%A8%E5%BC%95%E6%93%8E.png) -### System Monitoring +### 4.5 System Monitoring You can monitor, but not limited to: diff --git a/src/UserGuide/latest-Table/Tools-System/Monitor-Tool_timecho.md b/src/UserGuide/latest-Table/Tools-System/Monitor-Tool_timecho.md index 4b5d7d5da..c300671bc 100644 --- a/src/UserGuide/latest-Table/Tools-System/Monitor-Tool_timecho.md +++ b/src/UserGuide/latest-Table/Tools-System/Monitor-Tool_timecho.md @@ -18,10 +18,11 @@ under the License. --> +# Monitor Tool -## **Prometheus** **Integration** +## 1. **Prometheus** **Integration** -### **Prometheus Metric Mapping** +### 1.1 **Prometheus Metric Mapping** The following table illustrates the mapping of IoTDB metrics to the Prometheus-compatible format. For a given metric with `Metric Name = name` and tags `K1=V1, ..., Kn=Vn`, the mapping follows this pattern, where `value` represents the actual measurement. @@ -33,7 +34,7 @@ The following table illustrates the mapping of IoTDB metrics to the Prometheus-c | Rate | name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value
name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="m1"} value
name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="m5"} value
name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="m15"} value
name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="mean"} value | | Timer | name_seconds_max{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value
name_seconds_sum{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value
name_seconds_count{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value
name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", quantile="0.5"} value
name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", quantile="0.99"} value | -### **Configuration File** +### 1.2 **Configuration File** To enable Prometheus metric collection in IoTDB, modify the configuration file as follows: @@ -58,7 +59,7 @@ file_count{name="seq",} 2.0 ... ``` -### **Prometheus + Grafana** **Integration** +### 1.3 **Prometheus + Grafana** **Integration** IoTDB exposes monitoring data in the standard Prometheus-compatible format. Prometheus collects and stores these metrics, while Grafana is used for visualization. @@ -102,7 +103,7 @@ For more details, refer to: - [Grafana getting_started](https://grafana.com/docs/grafana/latest/getting-started/getting-started/) - [Grafana query metrics from Prometheus](https://prometheus.io/docs/visualization/grafana/#grafana-support-for-prometheus) -## **Apache IoTDB Dashboard** +## 2. **Apache IoTDB Dashboard** We introduce the Apache IoTDB Dashboard, designed for unified centralized operations and management, which enables monitoring multiple clusters through a single panel. @@ -112,7 +113,7 @@ We introduce the Apache IoTDB Dashboard, designed for unified centralized operat You can access the Dashboard's Json file in TimechoDB. -### **Cluster Overview** +### 2.1 **Cluster Overview** Including but not limited to: @@ -125,7 +126,7 @@ Including but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E6%A6%82%E8%A7%88.png) -### **Data Writing** +### 2.2 **Data Writing** Including but not limited to: @@ -135,7 +136,7 @@ Including but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E5%86%99%E5%85%A5.png) -### **Data Querying** +### 2.3 **Data Querying** Including but not limited to: @@ -149,7 +150,7 @@ Including but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E6%9F%A5%E8%AF%A2.png) -### **Storage Engine** +### 2.4 **Storage Engine** Including but not limited to: @@ -159,7 +160,7 @@ Including but not limited to: ![](/img/%E7%9B%91%E6%8E%A7%20%E5%AD%98%E5%82%A8%E5%BC%95%E6%93%8E.png) -### **System Monitoring** +### 2.5 **System Monitoring** Including but not limited to: diff --git a/src/UserGuide/latest-Table/User-Manual/Data-Sync_apache.md b/src/UserGuide/latest-Table/User-Manual/Data-Sync_apache.md index d6d84b652..02b233cb4 100644 --- a/src/UserGuide/latest-Table/User-Manual/Data-Sync_apache.md +++ b/src/UserGuide/latest-Table/User-Manual/Data-Sync_apache.md @@ -23,7 +23,7 @@ Data synchronization is a typical requirement in the Industrial Internet of Things (IIoT). Through data synchronization mechanisms, data sharing between IoTDB instances can be achieved, enabling the establishment of a complete data pipeline to meet needs such as internal and external network data exchange, edge-to-cloud synchronization, data migration, and data backup. -## 1 Functional Overview +## 1. Functional Overview ### 1.1 Data Synchronization @@ -43,7 +43,7 @@ By declaratively configuring these three parts in an SQL statement, flexible dat - Does not support data synchronization from IoTDB version 2.x series to version 1.x series. - When performing data synchronization tasks, avoid executing any deletion operations to prevent inconsistencies between the two ends. -## 2 Usage Instructions +## 2. Usage Instructions A data synchronization task can be in one of three states: RUNNING, STOPPED, and DROPPED. The state transitions of the task are illustrated in the diagram below: @@ -208,7 +208,7 @@ Detailed introduction of pre-installed plugins is as follows (for detailed param -## 3 Usage Examples +## 3. Usage Examples ### 3.1 Full Data Synchronization @@ -401,7 +401,7 @@ WITH SINK ( ``` -## 4 Reference: Notes +## 4. Reference: Notes You can adjust the parameters for data synchronization by modifying the IoTDB configuration file (`iotdb-system.properties`), such as the directory for storing synchronized data. The complete configuration is as follows: @@ -464,7 +464,7 @@ pipe_sink_max_client_number=16 pipe_all_sinks_rate_limit_bytes_per_second=-1 ``` -## 5 Reference: Parameter Description +## 5. Reference: Parameter Description ### 5.1 source parameter diff --git a/src/UserGuide/latest-Table/User-Manual/Data-Sync_timecho.md b/src/UserGuide/latest-Table/User-Manual/Data-Sync_timecho.md index 705f3ba4c..92a097141 100644 --- a/src/UserGuide/latest-Table/User-Manual/Data-Sync_timecho.md +++ b/src/UserGuide/latest-Table/User-Manual/Data-Sync_timecho.md @@ -22,7 +22,7 @@ Data synchronization is a typical requirement in the Industrial Internet of Things (IIoT). Through data synchronization mechanisms, data sharing between IoTDB instances can be achieved, enabling the establishment of a complete data pipeline to meet needs such as internal and external network data exchange, edge-to-cloud synchronization, data migration, and data backup. -## 1 Functional Overview +## 1. Functional Overview ### 1.1 Data Synchronization @@ -42,7 +42,7 @@ By declaratively configuring these three parts in an SQL statement, flexible dat - Does not support data synchronization from IoTDB version 2.x series to version 1.x series. - When performing data synchronization tasks, avoid executing any deletion operations to prevent inconsistencies between the two ends. -## 2 Usage Instructions +## 2. Usage Instructions A data synchronization task can be in one of three states: RUNNING, STOPPED, and DROPPED. The state transitions of the task are illustrated in the diagram below: @@ -209,7 +209,7 @@ Detailed introduction of pre-installed plugins is as follows (for detailed param -## 3 Usage Examples +## 3. Usage Examples ### 3.1 Full Data Synchronization @@ -418,7 +418,7 @@ WITH SINK ( ) ``` -## 4 Reference: Notes +## 4. Reference: Notes You can adjust the parameters for data synchronization by modifying the IoTDB configuration file (`iotdb-system.properties`), such as the directory for storing synchronized data. The complete configuration is as follows: @@ -491,7 +491,7 @@ pipe_air_gap_receiver_port=9780 pipe_all_sinks_rate_limit_bytes_per_second=-1 ``` -## 5 Reference: Parameter Description +## 5. Reference: Parameter Description ### 5.1 source parameter diff --git a/src/UserGuide/latest-Table/User-Manual/Query-Performance-Analysis.md b/src/UserGuide/latest-Table/User-Manual/Query-Performance-Analysis.md index 3b3c0c3e6..2fa83c6aa 100644 --- a/src/UserGuide/latest-Table/User-Manual/Query-Performance-Analysis.md +++ b/src/UserGuide/latest-Table/User-Manual/Query-Performance-Analysis.md @@ -18,6 +18,7 @@ under the License. --> +# Query Performance Analysis Query analysis helps users understand query execution mechanisms and identify performance bottlenecks, facilitating optimization and improving efficiency. This directly enhances user experience and resource utilization. IoTDB provides two query analysis statements: **`EXPLAIN`** and **`EXPLAIN ANALYZE`**. @@ -34,9 +35,9 @@ Query analysis helps users understand query execution mechanisms and identify pe -## EXPLAIN Statement +## 1. EXPLAIN Statement -### Syntax +### 1.1 Syntax The `EXPLAIN` command allows users to view the execution plan of an SQL query. It presents the plan as a series of operators, illustrating how IoTDB processes the query. The syntax is as follows, where `` represents the target query: @@ -44,7 +45,7 @@ The `EXPLAIN` command allows users to view the execution plan of an SQL query. I EXPLAIN ``` -### Description +### 1.2 Description The result of `EXPLAIN` includes information such as data access strategies, whether filtering conditions are pushed down, and the distribution of the query plan across different nodes. This provides users with a means to visualize the internal execution logic of the query. @@ -102,9 +103,9 @@ The result shows that IoTDB retrieves data from different data partitions throug +-----------------------------------------------------------------------------------------------+ ``` -## EXPLAIN ANALYZE Statement +## 2. EXPLAIN ANALYZE Statement -### Syntax +### 2.1 Syntax The `EXPLAIN ANALYZE` statement provides detailed performance metrics by executing the query and analyzing its runtime behavior. The syntax is as follows: @@ -115,7 +116,7 @@ EXPLAIN ANALYZE [VERBOSE] - `SELECT_STATEMENT` corresponds to the query statement to be analyzed. - `VERBOSE` (optional): Prints detailed analysis results. Without this option, some metrics are omitted. -### Description +### 2.2 Description `Explain Analyze` is a performance analysis SQL built into the IoTDB query engine. Unlike `Explain`, it runs the query and collects execution metrics, enabling users to trace performance bottlenecks, observe resource usage, and conduct precise performance tuning. @@ -123,7 +124,7 @@ The output includes detailed statistics such as query planning time, execution t ![](/img/explain-analyze-1.png) -### Detailed Breakdown of EXPLAIN ANALYZE Results +### 2.3 Detailed Breakdown of EXPLAIN ANALYZE Results #### QueryStatistics @@ -190,7 +191,7 @@ Chunks are the fundamental units of data storage in TsFiles. - loadChunkFromDiskCount: Number of times Chunks were read from disk. - loadChunkActualIOSize: Disk I/O used when reading Chunks (in bytes). -### Special Notes +### 2.4 Special Notes **Query** **Timeout Scenario with EXPLAIN ANALYZE** @@ -199,7 +200,7 @@ Since `EXPLAIN ANALYZE` runs as a special query type, it cannot return results i - The logging interval is dynamically calculated based on the query's timeout duration, ensuring at least two log entries before the timeout occurs. - Users can examine the log file to identify potential causes of the timeout. -### Example +### 2.5 Example The following example demonstrates how to use `EXPLAIN ANALYZE`: @@ -324,7 +325,7 @@ EXPLAIN ANALYZE VERBOSE SELECT * FROM t1; +-----------------------------------------------------------------------------------------------+ ``` -### FAQs +### 2.6 FAQs #### Differences Between WALL TIME and CPU TIME diff --git a/src/UserGuide/latest-Table/User-Manual/Tiered-Storage_timecho.md b/src/UserGuide/latest-Table/User-Manual/Tiered-Storage_timecho.md index 406798d64..587d87d2e 100644 --- a/src/UserGuide/latest-Table/User-Manual/Tiered-Storage_timecho.md +++ b/src/UserGuide/latest-Table/User-Manual/Tiered-Storage_timecho.md @@ -18,14 +18,15 @@ under the License. --> +# Tiered Storage -## Overview +## 1. Overview The **tiered storage** feature enables users to manage multiple types of storage media efficiently. Users can configure different storage media types within IoTDB and classify them into distinct storage tiers. In IoTDB, tiered storage is implemented by managing multiple directories. Users can group multiple storage directories into the same category and designate them as a **storage tier**. Additionally, data can be classified based on its "hotness" or "coldness" and stored accordingly in designated tiers. Currently, IoTDB supports hot and cold data classification based on the **Time-To-Live (****TTL****)** parameter. When data in a tier no longer meets the defined TTL rules, it is automatically migrated to the next tier. -## **Parameter Definitions** +## 2. **Parameter Definitions** To enable multi-level storage in IoTDB, the following configurations are required: @@ -49,7 +50,7 @@ The specific parameter definitions and their descriptions are as follows. | `remote_tsfile_cache_page_size_in_kb` | `20480` | Page size (in KB) for cloud storage local cache. | Required only if cloud storage is used. | | `remote_tsfile_cache_max_disk_usage_in_mb` | `51200` | Maximum disk space (in MB) allocated for cloud storage local cache. | Required only if cloud storage is used. | -## Local Tiered Storage Example +## 3. Local Tiered Storage Example The following is an example of a **two-tier local storage configuration**: @@ -67,7 +68,7 @@ dn_default_space_usage_thresholds=0.2;0.1 | Tier 1 | `/data1/data` | Last 1 day of data | 20% | | Tier 2 | `/data2/data`, `/data3/data` | Data older than 1 day | 10% | -## Cloud-based Tiered Storage Example +## 4. Cloud-based Tiered Storage Example The following is an example of a **three-tier configuration with cloud storage**: