This is an automated email from the ASF dual-hosted git repository.
critas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git
The following commit(s) were added to refs/heads/main by this push:
new 25d624a4 fix-ttl-chinese (#740)
25d624a4 is described below
commit 25d624a421bc1b2e19f6206e5018f04d12f6096c
Author: leto-b <[email protected]>
AuthorDate: Fri May 16 14:53:50 2025 +0800
fix-ttl-chinese (#740)
---
src/UserGuide/dev-1.3/Basic-Concept/Delete-Data.md | 104 ++++++++++++++++
src/UserGuide/dev-1.3/Basic-Concept/TTL-Delete.md | 134 +++++++++++++++++++++
.../{Write-Delete-Data.md => Write-Data.md} | 88 +-------------
.../dev-1.3/QuickStart/QuickStart_apache.md | 2 +-
.../dev-1.3/QuickStart/QuickStart_timecho.md | 2 +-
src/UserGuide/dev-1.3/SQL-Manual/SQL-Manual.md | 4 +-
.../Master/Table/Basic-Concept/TTL-Delete-Data.md | 2 +-
.../Tree/Basic-Concept/Operate-Metadata_apache.md | 4 +-
.../Tree/Basic-Concept/Operate-Metadata_timecho.md | 4 +-
.../Master/Tree/Basic-Concept/TTL-Delete.md | 2 +-
.../Basic-Concept/Operate-Metadata_apache.md | 4 +-
.../Basic-Concept/Operate-Metadata_timecho.md | 4 +-
.../UserGuide/V1.3.x/Basic-Concept/TTL-Delete.md | 2 +-
.../UserGuide/dev-1.3/Basic-Concept/Delete-Data.md | 91 ++++++++++++++
.../Basic-Concept/Operate-Metadata_apache.md | 4 +-
.../Basic-Concept/Operate-Metadata_timecho.md | 4 +-
.../Basic-Concept/TTL-Delete.md | 2 +-
.../{Write-Delete-Data.md => Write-Data.md} | 74 +-----------
.../dev-1.3/QuickStart/QuickStart_apache.md | 2 +-
.../dev-1.3/QuickStart/QuickStart_timecho.md | 2 +-
.../latest-Table/Basic-Concept/TTL-Delete-Data.md | 2 +-
.../Basic-Concept/Operate-Metadata_apache.md | 4 +-
.../Basic-Concept/Operate-Metadata_timecho.md | 4 +-
.../UserGuide/latest/Basic-Concept/TTL-Delete.md | 2 +-
24 files changed, 365 insertions(+), 182 deletions(-)
diff --git a/src/UserGuide/dev-1.3/Basic-Concept/Delete-Data.md
b/src/UserGuide/dev-1.3/Basic-Concept/Delete-Data.md
new file mode 100644
index 00000000..a5da0a2f
--- /dev/null
+++ b/src/UserGuide/dev-1.3/Basic-Concept/Delete-Data.md
@@ -0,0 +1,104 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+# Delete Data
+
+Users can delete data that meet the deletion condition in the specified
timeseries by using the [DELETE
statement](../SQL-Manual/SQL-Manual.md#delete-data). When deleting data, users
can select one or more timeseries paths, prefix paths, or paths with star to
delete data within a certain time interval.
+
+In a JAVA programming environment, you can use the [Java
JDBC](../API/Programming-JDBC.md) to execute single or batch UPDATE statements.
+
+## Delete Single Timeseries
+
+Taking ln Group as an example, there exists such a usage scenario:
+
+The wf02 plant's wt02 device has many segments of errors in its power supply
status before 2017-11-01 16:26:00, and the data cannot be analyzed correctly.
The erroneous data affected the correlation analysis with other devices. At
this point, the data before this time point needs to be deleted. The SQL
statement for this operation is
+
+```sql
+delete from root.ln.wf02.wt02.status where time<=2017-11-01T16:26:00;
+```
+
+In case we hope to merely delete the data before 2017-11-01 16:26:00 in the
year of 2017, The SQL statement is:
+
+```sql
+delete from root.ln.wf02.wt02.status where time>=2017-01-01T00:00:00 and
time<=2017-11-01T16:26:00;
+```
+
+IoTDB supports to delete a range of timeseries points. Users can write SQL
expressions as follows to specify the delete interval:
+
+```sql
+delete from root.ln.wf02.wt02.status where time < 10
+delete from root.ln.wf02.wt02.status where time <= 10
+delete from root.ln.wf02.wt02.status where time < 20 and time > 10
+delete from root.ln.wf02.wt02.status where time <= 20 and time >= 10
+delete from root.ln.wf02.wt02.status where time > 20
+delete from root.ln.wf02.wt02.status where time >= 20
+delete from root.ln.wf02.wt02.status where time = 20
+```
+
+Please pay attention that multiple intervals connected by "OR" expression are
not supported in delete statement:
+
+```
+delete from root.ln.wf02.wt02.status where time > 4 or time < 0
+Msg: 303: Check metadata error: For delete statement, where clause can only
contain atomic
+expressions like : time > XXX, time <= XXX, or two atomic expressions
connected by 'AND'
+```
+
+If no "where" clause specified in a delete statement, all the data in a
timeseries will be deleted.
+
+```sql
+delete from root.ln.wf02.wt02.status
+```
+
+
+## Delete Multiple Timeseries
+
+If both the power supply status and hardware version of the ln group wf02
plant wt02 device before 2017-11-01 16:26:00 need to be deleted, [the prefix
path with broader meaning or the path with
star](../Basic-Concept/Data-Model-and-Terminology.md) can be used to delete the
data. The SQL statement for this operation is:
+
+```sql
+delete from root.ln.wf02.wt02 where time <= 2017-11-01T16:26:00;
+```
+
+or
+
+```sql
+delete from root.ln.wf02.wt02.* where time <= 2017-11-01T16:26:00;
+```
+
+It should be noted that when the deleted path does not exist, IoTDB will not
prompt that the path does not exist, but that the execution is successful,
because SQL is a declarative programming method. Unless it is a syntax error,
insufficient permissions and so on, it is not considered an error, as shown
below:
+
+```
+IoTDB> delete from root.ln.wf03.wt02.status where time < now()
+Msg: The statement is executed successfully.
+```
+
+## Delete Time Partition (experimental)
+
+You may delete all data in a time partition of a database using the following
grammar:
+
+```sql
+DELETE PARTITION root.ln 0,1,2
+```
+
+The `0,1,2` above is the id of the partition that is to be deleted, you can
find it from the IoTDB
+data folders or convert a timestamp manually to an id using `timestamp /
partitionInterval
+` (flooring), and the `partitionInterval` should be in your config (if
time-partitioning is
+supported in your version).
+
+Please notice that this function is experimental and mainly for development,
please use it with care.
diff --git a/src/UserGuide/dev-1.3/Basic-Concept/TTL-Delete.md
b/src/UserGuide/dev-1.3/Basic-Concept/TTL-Delete.md
new file mode 100644
index 00000000..46792275
--- /dev/null
+++ b/src/UserGuide/dev-1.3/Basic-Concept/TTL-Delete.md
@@ -0,0 +1,134 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+# TTL Delete Data
+
+## Overview
+
+IoTDB supports device-level TTL settings, which means it is able to delete old
data automatically and periodically. The benefit of using TTL is that hopefully
you can control the total disk space usage and prevent the machine from running
out of disks. Moreover, the query performance may downgrade as the total number
of files goes up and the memory usage also increases as there are more files.
Timely removing such files helps to keep at a high query performance level and
reduce memory usage.
+
+The default unit of TTL is milliseconds. If the time precision in the
configuration file changes to another, the TTL is still set to milliseconds.
+
+When setting TTL, the system will look for all devices included in the set
path and set TTL for these devices. The system will delete expired data at the
device granularity.
+After the device data expires, it will not be queryable. The data in the disk
file cannot be guaranteed to be deleted immediately, but it can be guaranteed
to be deleted eventually.
+However, due to operational costs, the expired data will not be physically
deleted right after expiring. The physical deletion is delayed until compaction.
+Therefore, before the data is physically deleted, if the TTL is reduced or
lifted, it may cause data that was previously invisible due to TTL to reappear.
+The system can only set up to 1000 TTL rules, and when this limit is reached,
some TTL rules need to be deleted before new rules can be set.
+
+## Set TTL
+### TTL Path Rule
+The path can only be prefix paths (i.e., the path cannot contain \* , except
\*\* in the last level).
+This path will match devices and also allows users to specify paths without
asterisks as specific databases or devices.
+When the path does not contain asterisks, the system will check if it matches
a database; if it matches a database, both the path and path.\*\* will be set
at the same time. Note: Device TTL settings do not verify the existence of
metadata, i.e., it is allowed to set TTL for a non-existent device.
+```
+qualified paths:
+root.**
+root.db.**
+root.db.group1.**
+root.db
+root.db.group1.d1
+
+unqualified paths:
+root.*.db
+root.**.db.*
+root.db.*
+```
+### TTL Applicable Rules
+When a device is subject to multiple TTL rules, the more precise and longer
rules are prioritized. For example, for the device
"root.bj.hd.dist001.turbine001", the rule "root.bj.hd.dist001.turbine001" takes
precedence over "root.bj.hd.dist001.\*\*", and the rule
"root.bj.hd.dist001.\*\*" takes precedence over "root.bj.hd.**".
+### Set TTL
+The set ttl operation can be understood as setting a TTL rule, for example,
setting ttl to root.sg.group1.** is equivalent to mounting ttl for all devices
that can match this path pattern.
+The unset ttl operation indicates unmounting TTL for the corresponding path
pattern; if there is no corresponding TTL, nothing will be done.
+If you want to set TTL to be infinitely large, you can use the INF keyword.
+The SQL Statement for setting TTL is as follow:
+```
+set ttl to pathPattern 360000;
+```
+Set the Time to Live (TTL) to a pathPattern of 360,000 milliseconds; the
pathPattern should not contain a wildcard (\*) in the middle and must end with
a double asterisk (\*\*). The pathPattern is used to match corresponding
devices.
+To maintain compatibility with older SQL syntax, if the user-provided
pathPattern matches a database (db), the path pattern is automatically expanded
to include all sub-paths denoted by path.\*\*.
+For instance, writing "set ttl to root.sg 360000" will automatically be
transformed into "set ttl to root.sg.\*\* 360000", which sets the TTL for all
devices under root.sg. However, if the specified pathPattern does not match a
database, the aforementioned logic will not apply. For example, writing "set
ttl to root.sg.group 360000" will not be expanded to "root.sg.group.\*\*" since
root.sg.group does not match a database.
+It is also permissible to specify a particular device without a wildcard (*).
+## Unset TTL
+
+To unset TTL, we can use follwing SQL statement:
+
+```
+IoTDB> unset ttl from root.ln
+```
+
+After unset TTL, all data will be accepted in `root.ln`.
+```
+IoTDB> unset ttl from root.sgcc.**
+```
+
+Unset the TTL in the `root.sgcc` path.
+
+New syntax
+```
+IoTDB> unset ttl from root.**
+```
+
+Old syntax
+```
+IoTDB> unset ttl to root.**
+```
+There is no functional difference between the old and new syntax, and they are
compatible with each other.
+The new syntax is just more conventional in terms of wording.
+
+Unset the TTL setting for all path pattern.
+
+## Show TTL
+
+To Show TTL, we can use following SQL statement:
+
+show all ttl
+
+```
+IoTDB> SHOW ALL TTL
++--------------+--------+
+| path| TTL|
+| root.**|55555555|
+| root.sg2.a.**|44440000|
++--------------+--------+
+```
+
+show ttl on pathPattern
+```
+IoTDB> SHOW TTL ON root.db.**;
++--------------+--------+
+| path| TTL|
+| root.db.**|55555555|
+| root.db.a.**|44440000|
++--------------+--------+
+```
+
+The SHOW ALL TTL example gives the TTL for all path patterns.
+The SHOW TTL ON pathPattern shows the TTL for the path pattern specified.
+
+Display devices' ttl
+```
+IoTDB> show devices
++---------------+---------+---------+
+| Device|IsAligned| TTL|
++---------------+---------+---------+
+|root.sg.device1| false| 36000000|
+|root.sg.device2| true| INF|
++---------------+---------+---------+
+```
+All devices will definitely have a TTL, meaning it cannot be null. INF
represents infinity.
\ No newline at end of file
diff --git a/src/UserGuide/dev-1.3/Basic-Concept/Write-Delete-Data.md
b/src/UserGuide/dev-1.3/Basic-Concept/Write-Data.md
similarity index 68%
rename from src/UserGuide/dev-1.3/Basic-Concept/Write-Delete-Data.md
rename to src/UserGuide/dev-1.3/Basic-Concept/Write-Data.md
index b445bf3e..934aef19 100644
--- a/src/UserGuide/dev-1.3/Basic-Concept/Write-Delete-Data.md
+++ b/src/UserGuide/dev-1.3/Basic-Concept/Write-Data.md
@@ -20,7 +20,7 @@
-->
-# Write & Delete Data
+# Write Data
## CLI INSERT
IoTDB provides users with a variety of ways to insert real-time data, such as
directly inputting [INSERT SQL
statement](../SQL-Manual/SQL-Manual.md#insert-data) in [Client/Shell
tools](../Tools-System/CLI.md), or using [Java
JDBC](../API/Programming-JDBC.md) to perform single or batch execution of
[INSERT SQL statement](../SQL-Manual/SQL-Manual.md).
@@ -33,8 +33,6 @@ Writing a repeat timestamp covers the original timestamp
data, which can be rega
The [INSERT SQL statement](../SQL-Manual/SQL-Manual.md#insert-data) statement
is used to insert data into one or more specified timeseries created. For each
point of data inserted, it consists of a
[timestamp](../Basic-Concept/Data-Model-and-Terminology.md) and a sensor
acquisition value (see [Data Type](../Background-knowledge/Data-Type.md)).
-**Schema-less writing**: When metadata is not defined, data can be directly
written through an insert statement, and the required metadata will be
automatically recognized and registered in the database, achieving automatic
modeling.
-
In the scenario of this section, take two timeseries
`root.ln.wf02.wt02.status` and `root.ln.wf02.wt02.hardware` as an example, and
their data types are BOOLEAN and TEXT, respectively.
The sample code for single column data insertion is as follows:
@@ -193,88 +191,10 @@ TsFile is the file format of time series used in IoTDB.
You can directly import
CSV stores table data in plain text. You can write multiple formatted data
into a CSV file and import the data into the IoTDB in batches. Before importing
data, you are advised to create the corresponding metadata in the IoTDB. Don't
worry if you forget to create one, the IoTDB can automatically infer the data
in the CSV to its corresponding data type, as long as you have a unique data
type for each column. In addition to a single file, the tool supports importing
multiple CSV files as f [...]
-## DELETE
-
-Users can delete data that meet the deletion condition in the specified
timeseries by using the [DELETE
statement](../SQL-Manual/SQL-Manual.md#delete-data). When deleting data, users
can select one or more timeseries paths, prefix paths, or paths with star to
delete data within a certain time interval.
-
-In a JAVA programming environment, you can use the [Java
JDBC](../API/Programming-JDBC.md) to execute single or batch UPDATE statements.
-
-### Delete Single Timeseries
-
-Taking ln Group as an example, there exists such a usage scenario:
-
-The wf02 plant's wt02 device has many segments of errors in its power supply
status before 2017-11-01 16:26:00, and the data cannot be analyzed correctly.
The erroneous data affected the correlation analysis with other devices. At
this point, the data before this time point needs to be deleted. The SQL
statement for this operation is
-
-```sql
-delete from root.ln.wf02.wt02.status where time<=2017-11-01T16:26:00;
-```
-
-In case we hope to merely delete the data before 2017-11-01 16:26:00 in the
year of 2017, The SQL statement is:
-
-```sql
-delete from root.ln.wf02.wt02.status where time>=2017-01-01T00:00:00 and
time<=2017-11-01T16:26:00;
-```
-
-IoTDB supports to delete a range of timeseries points. Users can write SQL
expressions as follows to specify the delete interval:
-
-```sql
-delete from root.ln.wf02.wt02.status where time < 10
-delete from root.ln.wf02.wt02.status where time <= 10
-delete from root.ln.wf02.wt02.status where time < 20 and time > 10
-delete from root.ln.wf02.wt02.status where time <= 20 and time >= 10
-delete from root.ln.wf02.wt02.status where time > 20
-delete from root.ln.wf02.wt02.status where time >= 20
-delete from root.ln.wf02.wt02.status where time = 20
-```
-
-Please pay attention that multiple intervals connected by "OR" expression are
not supported in delete statement:
-
-```
-delete from root.ln.wf02.wt02.status where time > 4 or time < 0
-Msg: 303: Check metadata error: For delete statement, where clause can only
contain atomic
-expressions like : time > XXX, time <= XXX, or two atomic expressions
connected by 'AND'
-```
-
-If no "where" clause specified in a delete statement, all the data in a
timeseries will be deleted.
+## SCHEMALESS WRITING
+In IoT scenarios, the types and quantities of devices may dynamically increase
or decrease over time, and different devices may generate data with varying
fields (e.g., temperature, humidity, status codes). Additionally, businesses
often require rapid deployment and flexible integration of new devices without
cumbersome predefined processes. Therefore, unlike traditional time-series
databases that typically require predefining data models, IoTDB supports
schema-less writing, where the da [...]
-```sql
-delete from root.ln.wf02.wt02.status
-```
-
-
-### Delete Multiple Timeseries
-
-If both the power supply status and hardware version of the ln group wf02
plant wt02 device before 2017-11-01 16:26:00 need to be deleted, [the prefix
path with broader meaning or the path with
star](../Basic-Concept/Data-Model-and-Terminology.md) can be used to delete the
data. The SQL statement for this operation is:
-
-```sql
-delete from root.ln.wf02.wt02 where time <= 2017-11-01T16:26:00;
-```
-
-or
-
-```sql
-delete from root.ln.wf02.wt02.* where time <= 2017-11-01T16:26:00;
-```
-
-It should be noted that when the deleted path does not exist, IoTDB will not
prompt that the path does not exist, but that the execution is successful,
because SQL is a declarative programming method. Unless it is a syntax error,
insufficient permissions and so on, it is not considered an error, as shown
below:
-
-```
-IoTDB> delete from root.ln.wf03.wt02.status where time < now()
-Msg: The statement is executed successfully.
-```
-
-### Delete Time Partition (experimental)
-
-You may delete all data in a time partition of a database using the following
grammar:
-
-```sql
-DELETE PARTITION root.ln 0,1,2
-```
+Users can either use CLI `INSERT` statements or native APIs to write data in
real-time, either in batches or row-by-row, for single or multiple devices.
Alternatively, they can import historical data in formats such as CSV or TsFile
using import tools, during which metadata like time series, data types, and
compression encoding methods are automatically created.
-The `0,1,2` above is the id of the partition that is to be deleted, you can
find it from the IoTDB
-data folders or convert a timestamp manually to an id using `timestamp /
partitionInterval
-` (flooring), and the `partitionInterval` should be in your config (if
time-partitioning is
-supported in your version).
-Please notice that this function is experimental and mainly for development,
please use it with care.
diff --git a/src/UserGuide/dev-1.3/QuickStart/QuickStart_apache.md
b/src/UserGuide/dev-1.3/QuickStart/QuickStart_apache.md
index a8ad35f1..50a62463 100644
--- a/src/UserGuide/dev-1.3/QuickStart/QuickStart_apache.md
+++ b/src/UserGuide/dev-1.3/QuickStart/QuickStart_apache.md
@@ -50,7 +50,7 @@ This document will help you quickly install and deploy IoTDB.
You can quickly lo
- SQL syntax introduction: [Operate
Metadata](../Basic-Concept/Operate-Metadata_apache.md)
-2. Write Data: In terms of data writing, IoTDB provides multiple ways to
insert real-time data. Please refer to the basic data writing operations for
details [Write Data](../Basic-Concept/Write-Delete-Data.md)
+2. Write Data: In terms of data writing, IoTDB provides multiple ways to
insert real-time data. Please refer to the basic data writing operations for
details [Write Data](../Basic-Concept/Write-Data)
3. Query Data: IoTDB provides rich data query functions. Please refer to the
basic introduction of data query [Query Data](../Basic-Concept/Query-Data.md)
diff --git a/src/UserGuide/dev-1.3/QuickStart/QuickStart_timecho.md
b/src/UserGuide/dev-1.3/QuickStart/QuickStart_timecho.md
index 8cbf48a1..8b229a57 100644
--- a/src/UserGuide/dev-1.3/QuickStart/QuickStart_timecho.md
+++ b/src/UserGuide/dev-1.3/QuickStart/QuickStart_timecho.md
@@ -58,7 +58,7 @@ This document will help you quickly install and deploy IoTDB.
You can quickly lo
- SQL syntax introduction:[Operate
Metadata](../Basic-Concept/Operate-Metadata_timecho.md)
-2. Write Data: In terms of data writing, IoTDB provides multiple ways to
insert real-time data. Please refer to the basic data writing operations for
details [Write Data](../Basic-Concept/Write-Delete-Data.md)
+2. Write Data: In terms of data writing, IoTDB provides multiple ways to
insert real-time data. Please refer to the basic data writing operations for
details [Write Data](../Basic-Concept/Write-Data)
3. Query Data: IoTDB provides rich data query functions. Please refer to the
basic introduction of data query [Query Data](../Basic-Concept/Query-Data.md)
diff --git a/src/UserGuide/dev-1.3/SQL-Manual/SQL-Manual.md
b/src/UserGuide/dev-1.3/SQL-Manual/SQL-Manual.md
index 7e0ee9dd..3cb860db 100644
--- a/src/UserGuide/dev-1.3/SQL-Manual/SQL-Manual.md
+++ b/src/UserGuide/dev-1.3/SQL-Manual/SQL-Manual.md
@@ -409,7 +409,7 @@ IoTDB> count devices root.ln.**
### Insert Data
-For more details, see document
[Write-Delete-Data](../Basic-Concept/Write-Delete-Data.md).
+For more details, see document [Write-Data](../Basic-Concept/Write-Data).
#### Use of INSERT Statements
@@ -471,7 +471,7 @@ For more details, see document [Data
Import](../Tools-System/Data-Import-Tool.md
## DELETE DATA
-For more details, see document
[Write-Delete-Data](../Basic-Concept/Write-Delete-Data.md).
+For more details, see document
[Write-Delete-Data](../Basic-Concept/Write-Data).
### Delete Single Timeseries
diff --git a/src/zh/UserGuide/Master/Table/Basic-Concept/TTL-Delete-Data.md
b/src/zh/UserGuide/Master/Table/Basic-Concept/TTL-Delete-Data.md
index e785752a..bd244777 100644
--- a/src/zh/UserGuide/Master/Table/Basic-Concept/TTL-Delete-Data.md
+++ b/src/zh/UserGuide/Master/Table/Basic-Concept/TTL-Delete-Data.md
@@ -23,7 +23,7 @@
## 1. 概览
-IoTDB支持表级的数据自动过期删除(TTL)设置,允许系统自动定期删除旧数据,以有效控制磁盘空间并维护高性能查询和低内存占用。TTL默认以毫秒为单位,数据过期后不可查询且禁止写入,但物理删除会延迟至压缩时。需注意,TTL变更可能导致短暂数据可查询性变化。
+IoTDB支持对表(table)级别设置数据保留时间(TTL),允许系统自动定期删除旧数据,以有效控制磁盘空间并维护高性能查询和低内存占用。TTL默认以毫秒为单位,数据过期后不可查询且禁止写入,但物理删除会延迟至压缩时。需注意,TTL变更可能导致短暂数据可查询性变化。
**注意事项:**
diff --git
a/src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_apache.md
b/src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_apache.md
index bfb0391f..aaecbdd8 100644
--- a/src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_apache.md
+++ b/src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_apache.md
@@ -139,9 +139,9 @@ Total line number = 1
It costs 0.002s
```
-### 1.5 数据存活时间(TTL)
+### 1.5 数据保留时间(TTL)
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git
a/src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_timecho.md
b/src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_timecho.md
index effb7c03..85c9aa6e 100644
--- a/src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_timecho.md
+++ b/src/zh/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_timecho.md
@@ -139,9 +139,9 @@ Total line number = 1
It costs 0.002s
```
-### 1.5 数据存活时间(TTL)
+### 1.5 数据保留时间(TTL)
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/Master/Tree/Basic-Concept/TTL-Delete.md
b/src/zh/UserGuide/Master/Tree/Basic-Concept/TTL-Delete.md
index 9ae6d0dc..b436ddfe 100644
--- a/src/zh/UserGuide/Master/Tree/Basic-Concept/TTL-Delete.md
+++ b/src/zh/UserGuide/Master/Tree/Basic-Concept/TTL-Delete.md
@@ -22,7 +22,7 @@
## 1. 概览
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_apache.md
b/src/zh/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_apache.md
index 84fff90f..c2ba00b7 100644
--- a/src/zh/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_apache.md
+++ b/src/zh/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_apache.md
@@ -139,9 +139,9 @@ Total line number = 1
It costs 0.002s
```
-### 数据存活时间(TTL)
+### 数据保留时间(TTL)
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_timecho.md
b/src/zh/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_timecho.md
index d8d79ebf..8b948fc4 100644
--- a/src/zh/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_timecho.md
+++ b/src/zh/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_timecho.md
@@ -138,9 +138,9 @@ Total line number = 1
It costs 0.002s
```
-### 数据存活时间(TTL)
+### 数据保留时间(TTL)
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL
可以帮助您控制 IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL
可以帮助您控制 IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/V1.3.x/Basic-Concept/TTL-Delete.md
b/src/zh/UserGuide/V1.3.x/Basic-Concept/TTL-Delete.md
index 7fb6d882..0ac0fa95 100644
--- a/src/zh/UserGuide/V1.3.x/Basic-Concept/TTL-Delete.md
+++ b/src/zh/UserGuide/V1.3.x/Basic-Concept/TTL-Delete.md
@@ -22,7 +22,7 @@
## 概览
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/dev-1.3/Basic-Concept/Delete-Data.md
b/src/zh/UserGuide/dev-1.3/Basic-Concept/Delete-Data.md
new file mode 100644
index 00000000..b8466aa2
--- /dev/null
+++ b/src/zh/UserGuide/dev-1.3/Basic-Concept/Delete-Data.md
@@ -0,0 +1,91 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+# 数据删除
+
+用户使用 [DELETE 语句](../SQL-Manual/SQL-Manual.md#删除数据)
可以删除指定的时间序列中符合时间删除条件的数据。在删除数据时,用户可以选择需要删除的一个或多个时间序列、时间序列的前缀、时间序列带、*路径对某一个时间区间内的数据进行删除。
+
+在 JAVA 编程环境中,您可以使用 JDBC API 单条或批量执行 DELETE 语句。
+
+## 单传感器时间序列值删除
+
+以测控 ln 集团为例,存在这样的使用场景:
+
+wf02 子站的 wt02 设备在 2017-11-01 16:26:00
之前的供电状态出现多段错误,且无法分析其正确数据,错误数据影响了与其他设备的关联分析。此时,需要将此时间段前的数据删除。进行此操作的 SQL 语句为:
+
+```sql
+delete from root.ln.wf02.wt02.status where time<=2017-11-01T16:26:00;
+```
+
+如果我们仅仅想要删除 2017 年内的在 2017-11-01 16:26:00 之前的数据,可以使用以下 SQL:
+```sql
+delete from root.ln.wf02.wt02.status where time>=2017-01-01T00:00:00 and
time<=2017-11-01T16:26:00;
+```
+
+IoTDB 支持删除一个时间序列任何一个时间范围内的所有时序点,用户可以使用以下 SQL 语句指定需要删除的时间范围:
+```sql
+delete from root.ln.wf02.wt02.status where time < 10
+delete from root.ln.wf02.wt02.status where time <= 10
+delete from root.ln.wf02.wt02.status where time < 20 and time > 10
+delete from root.ln.wf02.wt02.status where time <= 20 and time >= 10
+delete from root.ln.wf02.wt02.status where time > 20
+delete from root.ln.wf02.wt02.status where time >= 20
+delete from root.ln.wf02.wt02.status where time = 20
+```
+
+需要注意,当前的删除语句不支持 where 子句后的时间范围为多个由 OR 连接成的时间区间。如下删除语句将会解析出错:
+```
+delete from root.ln.wf02.wt02.status where time > 4 or time < 0
+Msg: 303: Check metadata error: For delete statement, where clause can only
contain atomic
+expressions like : time > XXX, time <= XXX, or two atomic expressions
connected by 'AND'
+```
+
+如果 delete 语句中未指定 where 子句,则会删除时间序列中的所有数据。
+```sql
+delete from root.ln.wf02.wt02.status
+```
+
+## 多传感器时间序列值删除
+
+当 ln 集团 wf02 子站的 wt02 设备在 2017-11-01 16:26:00 之前的供电状态和设备硬件版本都需要删除,此时可以使用含义更广的
[路径模式(Path Pattern)](../Basic-Concept/Data-Model-and-Terminology.md)
进行删除操作,进行此操作的 SQL 语句为:
+
+
+```sql
+delete from root.ln.wf02.wt02.* where time <= 2017-11-01T16:26:00;
+```
+
+需要注意的是,当删除的路径不存在时,IoTDB 不会提示路径不存在,而是显示执行成功,因为 SQL
是一种声明式的编程方式,除非是语法错误、权限不足等,否则都不认为是错误,如下所示。
+
+```sql
+IoTDB> delete from root.ln.wf03.wt02.status where time < now()
+Msg: The statement is executed successfully.
+```
+
+## 删除时间分区 (实验性功能)
+您可以通过如下语句来删除某一个 database 下的指定时间分区:
+
+```sql
+DELETE PARTITION root.ln 0,1,2
+```
+
+上例中的 0,1,2 为待删除时间分区的 id,您可以通过查看 IoTDB 的数据文件夹找到它,或者可以通过计算`timestamp /
partitionInterval`(向下取整),
+手动地将一个时间戳转换为对应的 id,其中的`partitionInterval`可以在 IoTDB 的配置文件中找到(如果您使用的版本支持时间分区)。
+
+请注意该功能目前只是实验性的,如果您不是开发者,使用时请务必谨慎。
\ No newline at end of file
diff --git a/src/zh/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_apache.md
b/src/zh/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_apache.md
index 84fff90f..c2ba00b7 100644
--- a/src/zh/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_apache.md
+++ b/src/zh/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_apache.md
@@ -139,9 +139,9 @@ Total line number = 1
It costs 0.002s
```
-### 数据存活时间(TTL)
+### 数据保留时间(TTL)
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_timecho.md
b/src/zh/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_timecho.md
index d8d79ebf..8b948fc4 100644
--- a/src/zh/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_timecho.md
+++ b/src/zh/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_timecho.md
@@ -138,9 +138,9 @@ Total line number = 1
It costs 0.002s
```
-### 数据存活时间(TTL)
+### 数据保留时间(TTL)
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL
可以帮助您控制 IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL
可以帮助您控制 IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/V1.3.x/Basic-Concept/TTL-Delete.md
b/src/zh/UserGuide/dev-1.3/Basic-Concept/TTL-Delete.md
similarity index 98%
copy from src/zh/UserGuide/V1.3.x/Basic-Concept/TTL-Delete.md
copy to src/zh/UserGuide/dev-1.3/Basic-Concept/TTL-Delete.md
index 7fb6d882..0ac0fa95 100644
--- a/src/zh/UserGuide/V1.3.x/Basic-Concept/TTL-Delete.md
+++ b/src/zh/UserGuide/dev-1.3/Basic-Concept/TTL-Delete.md
@@ -22,7 +22,7 @@
## 概览
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/dev-1.3/Basic-Concept/Write-Delete-Data.md
b/src/zh/UserGuide/dev-1.3/Basic-Concept/Write-Data.md
similarity index 68%
rename from src/zh/UserGuide/dev-1.3/Basic-Concept/Write-Delete-Data.md
rename to src/zh/UserGuide/dev-1.3/Basic-Concept/Write-Data.md
index 37119809..1b53fa8d 100644
--- a/src/zh/UserGuide/dev-1.3/Basic-Concept/Write-Delete-Data.md
+++ b/src/zh/UserGuide/dev-1.3/Basic-Concept/Write-Data.md
@@ -20,7 +20,7 @@
-->
-# 数据写入与删除
+# 数据写入
## CLI写入数据
IoTDB 为用户提供多种插入实时数据的方式,例如在 [Cli/Shell 工具](../Tools-System/CLI.md) 中直接输入插入数据的
INSERT 语句,或使用 Java API(标准 [Java JDBC](../API/Programming-JDBC.md)
接口)单条或批量执行插入数据的 INSERT 语句。
@@ -33,8 +33,6 @@ IoTDB 为用户提供多种插入实时数据的方式,例如在 [Cli/Shell
使用 INSERT
语句可以向指定的已经创建的一条或多条时间序列中插入数据。对于每一条数据,均由一个时间戳类型的时间戳和一个数值或布尔值、字符串类型的传感器采集值组成。
-**无模式写入**:可以在未定义元数据时, 通过 insert 语句直接写入数据,数据库中将自动识别并注册所需的元数据,实现自动建模。
-
在本节的场景实例下,以其中的两个时间序列`root.ln.wf02.wt02.status`和`root.ln.wf02.wt02.hardware`为例
,它们的数据类型分别为 BOOLEAN 和 TEXT。
单列数据插入示例代码如下:
@@ -184,75 +182,11 @@ TsFile 是在 IoTDB 中使用的时间序列的文件格式,您可以通过CLI
CSV 是以纯文本形式存储表格数据,您可以在CSV文件中写入多条格式化的数据,并批量的将这些数据导入到 IoTDB
中,在导入数据之前,建议在IoTDB中创建好对应的元数据信息。如果忘记创建元数据也不要担心,IoTDB
可以自动将CSV中数据推断为其对应的数据类型,前提是你每一列的数据类型必须唯一。除单个文件外,此工具还支持以文件夹的形式导入多个 CSV
文件,并且支持设置如时间精度等优化参数。具体操作方式请参考[数据导入](../Tools-System/Data-Import-Tool.md)。
-## 删除数据
-
-用户使用 [DELETE 语句](../SQL-Manual/SQL-Manual.md#删除数据)
可以删除指定的时间序列中符合时间删除条件的数据。在删除数据时,用户可以选择需要删除的一个或多个时间序列、时间序列的前缀、时间序列带、*路径对某一个时间区间内的数据进行删除。
-
-在 JAVA 编程环境中,您可以使用 JDBC API 单条或批量执行 DELETE 语句。
-
-### 单传感器时间序列值删除
-
-以测控 ln 集团为例,存在这样的使用场景:
-
-wf02 子站的 wt02 设备在 2017-11-01 16:26:00
之前的供电状态出现多段错误,且无法分析其正确数据,错误数据影响了与其他设备的关联分析。此时,需要将此时间段前的数据删除。进行此操作的 SQL 语句为:
-
-```sql
-delete from root.ln.wf02.wt02.status where time<=2017-11-01T16:26:00;
-```
+## 无模式写入
+在物联网场景中,由于设备的类型、数量可能随时间动态增减,不同设备可能产生不同字段的数据(如温度、湿度、状态码等),业务上又往往需要快速部署,需要灵活接入新设备且无需繁琐的预定义流程。因此,不同于传统时序数据库通常需要预先定义数据模型,IoTDB支持不提前创建元数据,在写入数据时,数据库中将自动识别并注册所需的元数据,实现自动建模。
-如果我们仅仅想要删除 2017 年内的在 2017-11-01 16:26:00 之前的数据,可以使用以下 SQL:
-```sql
-delete from root.ln.wf02.wt02.status where time>=2017-01-01T00:00:00 and
time<=2017-11-01T16:26:00;
-```
-
-IoTDB 支持删除一个时间序列任何一个时间范围内的所有时序点,用户可以使用以下 SQL 语句指定需要删除的时间范围:
-```sql
-delete from root.ln.wf02.wt02.status where time < 10
-delete from root.ln.wf02.wt02.status where time <= 10
-delete from root.ln.wf02.wt02.status where time < 20 and time > 10
-delete from root.ln.wf02.wt02.status where time <= 20 and time >= 10
-delete from root.ln.wf02.wt02.status where time > 20
-delete from root.ln.wf02.wt02.status where time >= 20
-delete from root.ln.wf02.wt02.status where time = 20
-```
-
-需要注意,当前的删除语句不支持 where 子句后的时间范围为多个由 OR 连接成的时间区间。如下删除语句将会解析出错:
-```
-delete from root.ln.wf02.wt02.status where time > 4 or time < 0
-Msg: 303: Check metadata error: For delete statement, where clause can only
contain atomic
-expressions like : time > XXX, time <= XXX, or two atomic expressions
connected by 'AND'
-```
+用户既可以通过CLI使用insert语句或者原生接口的方式,批量或者单行实时写入一个设备或者多个设备的测点数据,也可以通过导入工具导入csv,TsFile等格式的历史数据,在导入过程中会自动创建序列,数据类型,压缩编码方式等元数据。
-如果 delete 语句中未指定 where 子句,则会删除时间序列中的所有数据。
-```sql
-delete from root.ln.wf02.wt02.status
-```
-
-### 多传感器时间序列值删除
-
-当 ln 集团 wf02 子站的 wt02 设备在 2017-11-01 16:26:00 之前的供电状态和设备硬件版本都需要删除,此时可以使用含义更广的
[路径模式(Path Pattern)](../Basic-Concept/Data-Model-and-Terminology.md)
进行删除操作,进行此操作的 SQL 语句为:
-
-
-```sql
-delete from root.ln.wf02.wt02.* where time <= 2017-11-01T16:26:00;
-```
-
-需要注意的是,当删除的路径不存在时,IoTDB 不会提示路径不存在,而是显示执行成功,因为 SQL
是一种声明式的编程方式,除非是语法错误、权限不足等,否则都不认为是错误,如下所示。
-
-```sql
-IoTDB> delete from root.ln.wf03.wt02.status where time < now()
-Msg: The statement is executed successfully.
-```
-
-### 删除时间分区 (实验性功能)
-您可以通过如下语句来删除某一个 database 下的指定时间分区:
-
-```sql
-DELETE PARTITION root.ln 0,1,2
-```
-上例中的 0,1,2 为待删除时间分区的 id,您可以通过查看 IoTDB 的数据文件夹找到它,或者可以通过计算`timestamp /
partitionInterval`(向下取整),
-手动地将一个时间戳转换为对应的 id,其中的`partitionInterval`可以在 IoTDB 的配置文件中找到(如果您使用的版本支持时间分区)。
-请注意该功能目前只是实验性的,如果您不是开发者,使用时请务必谨慎。
diff --git a/src/zh/UserGuide/dev-1.3/QuickStart/QuickStart_apache.md
b/src/zh/UserGuide/dev-1.3/QuickStart/QuickStart_apache.md
index 3bc83eac..d0d4b61c 100644
--- a/src/zh/UserGuide/dev-1.3/QuickStart/QuickStart_apache.md
+++ b/src/zh/UserGuide/dev-1.3/QuickStart/QuickStart_apache.md
@@ -51,7 +51,7 @@
- SQL 语法介绍:[SQL 语法介绍](../Basic-Concept/Operate-Metadata_apache.md)
-2. 数据写入:在数据写入方面,IoTDB 提供了多种方式来插入实时数据,基本的数据写入操作请查看
[数据写入](../Basic-Concept/Write-Delete-Data.md)
+2. 数据写入:在数据写入方面,IoTDB 提供了多种方式来插入实时数据,基本的数据写入操作请查看
[数据写入](../Basic-Concept/Write-Data)
3. 数据查询:IoTDB 提供了丰富的数据查询功能,数据查询的基本介绍请查看 [数据查询](../Basic-Concept/Query-Data.md)
diff --git a/src/zh/UserGuide/dev-1.3/QuickStart/QuickStart_timecho.md
b/src/zh/UserGuide/dev-1.3/QuickStart/QuickStart_timecho.md
index 38d4a148..5adbdf61 100644
--- a/src/zh/UserGuide/dev-1.3/QuickStart/QuickStart_timecho.md
+++ b/src/zh/UserGuide/dev-1.3/QuickStart/QuickStart_timecho.md
@@ -59,7 +59,7 @@
- SQL 语法介绍:[SQL 语法介绍](../Basic-Concept/Operate-Metadata_timecho.md)
-2. 数据写入:在数据写入方面,IoTDB 提供了多种方式来插入实时数据,基本的数据写入操作请查看
[数据写入](../Basic-Concept/Write-Delete-Data.md)
+2. 数据写入:在数据写入方面,IoTDB 提供了多种方式来插入实时数据,基本的数据写入操作请查看
[数据写入](../Basic-Concept/Write-Data)
3. 数据查询:IoTDB 提供了丰富的数据查询功能,数据查询的基本介绍请查看 [数据查询](../Basic-Concept/Query-Data.md)
diff --git a/src/zh/UserGuide/latest-Table/Basic-Concept/TTL-Delete-Data.md
b/src/zh/UserGuide/latest-Table/Basic-Concept/TTL-Delete-Data.md
index e785752a..bd244777 100644
--- a/src/zh/UserGuide/latest-Table/Basic-Concept/TTL-Delete-Data.md
+++ b/src/zh/UserGuide/latest-Table/Basic-Concept/TTL-Delete-Data.md
@@ -23,7 +23,7 @@
## 1. 概览
-IoTDB支持表级的数据自动过期删除(TTL)设置,允许系统自动定期删除旧数据,以有效控制磁盘空间并维护高性能查询和低内存占用。TTL默认以毫秒为单位,数据过期后不可查询且禁止写入,但物理删除会延迟至压缩时。需注意,TTL变更可能导致短暂数据可查询性变化。
+IoTDB支持对表(table)级别设置数据保留时间(TTL),允许系统自动定期删除旧数据,以有效控制磁盘空间并维护高性能查询和低内存占用。TTL默认以毫秒为单位,数据过期后不可查询且禁止写入,但物理删除会延迟至压缩时。需注意,TTL变更可能导致短暂数据可查询性变化。
**注意事项:**
diff --git a/src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_apache.md
b/src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_apache.md
index bfb0391f..aaecbdd8 100644
--- a/src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_apache.md
+++ b/src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_apache.md
@@ -139,9 +139,9 @@ Total line number = 1
It costs 0.002s
```
-### 1.5 数据存活时间(TTL)
+### 1.5 数据保留时间(TTL)
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_timecho.md
b/src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_timecho.md
index effb7c03..85c9aa6e 100644
--- a/src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_timecho.md
+++ b/src/zh/UserGuide/latest/Basic-Concept/Operate-Metadata_timecho.md
@@ -139,9 +139,9 @@ Total line number = 1
It costs 0.002s
```
-### 1.5 数据存活时间(TTL)
+### 1.5 数据保留时间(TTL)
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。
diff --git a/src/zh/UserGuide/latest/Basic-Concept/TTL-Delete.md
b/src/zh/UserGuide/latest/Basic-Concept/TTL-Delete.md
index 9ae6d0dc..b436ddfe 100644
--- a/src/zh/UserGuide/latest/Basic-Concept/TTL-Delete.md
+++ b/src/zh/UserGuide/latest/Basic-Concept/TTL-Delete.md
@@ -22,7 +22,7 @@
## 1. 概览
-IoTDB 支持对 device 级别设置数据存活时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
+IoTDB 支持对 device 级别设置数据保留时间(TTL),这使得 IoTDB 可以定期、自动地删除一定时间之前的数据。合理使用 TTL可以帮助您控制
IoTDB
占用的总磁盘空间以避免出现磁盘写满等异常。并且,随着文件数量的增多,查询性能往往随之下降,内存占用也会有所提高。及时地删除一些较老的文件有助于使查询性能维持在一个较高的水平和减少内存资源的占用。
TTL的默认单位为毫秒,如果配置文件中的时间精度修改为其他单位,设置ttl时仍然使用毫秒单位。