This function is enabled by default, and it can be disabled by setting enabling_auto_create_schema to false.
Unable to predict entities and measurements exactly, so unable to model them in advance
Avoid creating metadata manually
| Name | default_storage_group_level |
|---|---|
| Description | Specify which level storage group is in the time series, the default level is 1 (root is on level 0) |
| Type | int |
| Default | 1 |
| Effective | Only allowed to be modified in first start up |
Illustrated as the following figure:
When default_storage_group_level=1, root.turbine1 and root.turbine2 will be set as storage group.
When default_storage_group_level=2, root.turbine1.d1, root.turbine1.d2, root.turbine2.d1 and root.turbine2.d2 will be set as storage group.
Users should specify data type when writing:
public void insertRecord(String deviceId, long time, List<String> measurements, List<TSDataType> types, Object... values); public void insertRecords(List<String> deviceIds, List<Long> times, List<List<String>> measurementsList, List<List<TSDataType>> typesList, List<List<Object>> valuesList);
Efficient, time series are auto created when inserting data.
Just pass string, and the database will infer the data type:
public void insertRecord(String deviceId, long time, List<String> measurements, List<TSDataType> types, List<Object> values); public void insertRecords(List<String> deviceIds, List<Long> times, List<List<String>> measurementsList, List<List<String>> valuesList);
Since type inference will increase the writing time, the efficiency of auto creating time series metadata through type inference is lower than that of auto creating time series metadata through specifying data type. We recommend users choose specifying data type in the frontend when possible.
| Data(String Format) | Format Type | iotdb-engine.properties | Default |
|---|---|---|---|
| true | boolean | boolean_string_infer_type | BOOLEAN |
| 1 | integer | integer_string_infer_type | FLOAT |
| 17000000(integer > 2^24) | integer | long_string_infer_type | DOUBLE |
| 1.2 | floating | floating_string_infer_type | FLOAT |
| NaN | nan | nan_string_infer_type | DOUBLE |
| ‘I am text’ | text | x | x |
Data types can be configured as BOOLEAN, INT32, INT64, FLOAT, DOUBLE, TEXT.
long_string_infer_type is used to avoid precision loss caused by using integer_string_infer_type=FLOAT to infer num > 2^24.
| Data Type | iotdb-engine.properties | Default |
|---|---|---|
| BOOLEAN | default_boolean_encoding | RLE |
| INT32 | default_int32_encoding | RLE |
| INT64 | default_int64_encoding | RLE |
| FLOAT | default_float_encoding | GORILLA |
| DOUBLE | default_double_encoding | GORILLA |
| TEXT | default_text_encoding | PLAIN |
Encoding types can be configured as PLAIN, RLE, TS_2DIFF, GORILLA, DICTIONARY.
The corresponding relationship between data types and encoding types is detailed in Encoding.