05-taosbenchmark.md 27.2 KB
Newer Older
D
dingbo 已提交
1 2 3 4
---
title: taosBenchmark
sidebar_label: taosBenchmark
toc_max_heading_level: 4
5
description: "taosBenchmark (once called taosdemo ) is a tool for testing the performance of TDengine."
D
dingbo 已提交
6 7
---

8
## Introduction
D
dingbo 已提交
9

D
dingbo 已提交
10
taosBenchmark (formerly taosdemo ) is a tool for testing the performance of TDengine products. taosBenchmark can test the performance of TDengine's insert, query, and subscription functions and simulate large amounts of data generated by many devices. taosBenchmark can be configured to generate user defined databases, supertables, subtables, and the time series data to populate these for performance benchmarking. taosBenchmark is highly configurable and some of the configurations include the time interval for inserting data, the number of working threads and the capability to insert disordered data. The installer provides taosdemo as a soft link to taosBenchmark for compatibility with past users.
D
dingbo 已提交
11

12
## Installation
D
dingbo 已提交
13

14
There are two ways to install taosBenchmark:
D
dingbo 已提交
15

16
- Installing the official TDengine installer will automatically install taosBenchmark. Please refer to [TDengine installation](/operation/pkg-install) for details.
D
dingbo 已提交
17

18
- Compile taos-tools separately and install them. Please refer to the [taos-tools](https://github.com/taosdata/taos-tools) repository for details.
D
dingbo 已提交
19

20
## Run
D
dingbo 已提交
21

22
### Configuration and running methods
D
dingbo 已提交
23

D
dingbo 已提交
24
TaosBenchmark needs to be executed on the terminal of the operating system, it supports two configuration methods: [Command-line arguments](#command-line-arguments-in-detail) and [JSON configuration file](#configuration-file-parameters-in-detail). These two methods are mutually exclusive. Users can use `-f <json file>` to specify a configuration file. When running taosBenchmark with command-line arguments to control its behavior, users should use other parameters for configuration, but not the `-f` parameter. In addition, taosBenchmark offers a special way of running without parameters.
D
dingbo 已提交
25

D
dingbo 已提交
26
taosBenchmark supports the complete performance testing of TDengine by providing functionally to write, query, and subscribe. These three functions are mutually exclusive, users can only select one of them each time taosBenchmark runs. The query and subscribe functionalities are only configurable using a json configuration file by specifying the parameter `filetype`, while write can be performed through both the command-line and a configuration file.
D
dingbo 已提交
27

28
**Make sure that the TDengine cluster is running correctly before running taosBenchmark. **
D
dingbo 已提交
29

30
### Run without command-line arguments
D
dingbo 已提交
31

32
Execute the following commands to quickly experience taosBenchmark's default configuration-based write performance testing of TDengine.
D
dingbo 已提交
33 34 35 36 37

```bash
taosBenchmark
```

38
When run without parameters, taosBenchmark connects to the TDengine cluster specified in `/etc/taos` by default and creates a database named `test`, a super table named `meters` under the test database, and 10,000 tables under the super table with 10,000 records written to each table. Note that if there is already a database named "test" this command will delete it first and create a new database.
D
dingbo 已提交
39

40
### Run with command-line configuration parameters
D
dingbo 已提交
41

42
The `-f <json file>` argument cannot be used when running taosBenchmark with command-line parameters and controlling its behavior. Users must specify all configuration parameters from the command-line. The following is an example of testing taosBenchmark writing performance using the command-line approach.
D
dingbo 已提交
43 44 45 46 47

```bash
taosBenchmark -I stmt -n 200 -t 100
```

48
Using the above command, `taosBenchmark` will create a database named `test`, create a super table `meters` in it, create 100 sub-tables in the super table and insert 200 records for each sub-table using parameter binding.
D
dingbo 已提交
49

50
### Run with the configuration file
D
dingbo 已提交
51

52
A sample configuration file is provided in the taosBenchmark installation package under `<install_directory>/examples/taosbenchmark-json`.
D
dingbo 已提交
53

54
Use the following command-line to run taosBenchmark and control its behavior via a configuration file.
D
dingbo 已提交
55 56 57 58 59

```bash
taosBenchmark -f <json file>
```

D
dingbo 已提交
60 61
#### Configuration file examples
##### Example of inserting a scenario JSON configuration file
D
dingbo 已提交
62 63 64 65 66 67 68 69 70 71

<details>
<summary>insert.json</summary>

```json
{{#include /taos-tools/example/insert.json}}
```

</details>

D
dingbo 已提交
72
##### Query Scenario JSON Profile Example
D
dingbo 已提交
73 74 75 76 77 78 79 80 81 82

<details>
<summary>query.json</summary>

```json
{{#include /taos-tools/example/query.json}}
```

</details>

D
dingbo 已提交
83
##### Subscription JSON configuration example
D
dingbo 已提交
84 85 86 87 88 89 90 91 92 93

<details>
<summary>subscribe.json</summary>

```json
{{#include /taos-tools/example/subscribe.json}}
```

</details>

94
## Command-line argument in detailed
D
dingbo 已提交
95 96

- **-f/--file <json file\>** :
97
  specify the configuration file to use. This file includes All parameters. Users should not use this parameter with other parameters on the command-line. There is no default value.
D
dingbo 已提交
98 99

- **-c/--config-dir <dir\>** :
100
  specify the directory where the TDengine cluster configuration file. The default path is `/etc/taos`.
D
dingbo 已提交
101 102

- **-h/--host <host\>** :
103
  Specify the FQDN of the TDengine server to connect to. The default value is localhost.
D
dingbo 已提交
104 105

- **-P/--port <port\>** :
106
  The port number of the TDengine server to connect to, the default value is 6030.
D
dingbo 已提交
107 108

- **-I/--interface <insertMode\>** :
109
  Insert mode. Options are taosc, rest, stmt, sml, sml-rest, corresponding to normal write, restful interface writing, parameter binding interface writing, schemaless interface writing, RESTful schemaless interface writing (provided by taosAdapter). The default value is taosc.
D
dingbo 已提交
110 111

- **-u/--user <user\>** :
112
  User name to connect to the TDengine server. Default is root.
D
dingbo 已提交
113 114

- **-p/--password <passwd\>** :
115
  The default password to connect to the TDengine server is `taosdata`.
D
dingbo 已提交
116 117

- **-o/--output <file\>** :
118
  specify the path of the result output file, the default value is `. /output.txt`.
D
dingbo 已提交
119 120

- **-T/--thread <threadNum\>** :
121
  The number of threads to insert data. Default is 8.
D
dingbo 已提交
122 123

- **-B/--interlace-rows <rowNum\>** :
124
  Enables interleaved insertion mode and specifies the number of rows of data to be inserted into each child table. Interleaved insertion mode means inserting the number of rows specified by this parameter into each sub-table and repeating the process until all sub-tables have been inserted. The default value is 0, i.e., data is inserted into one sub-table before the next sub-table is inserted.
D
dingbo 已提交
125 126

- **-i/--insert-interval <timeInterval\>** :
127
  Specify the insert interval in `ms` for interleaved insert mode. The default value is 0. It only works if `-B/--interlace-rows` is greater than 0. That means that after inserting interlaced rows for each child table, the data insertion with multiple threads will wait for the interval specified by this value before proceeding to the next round of writes.
D
dingbo 已提交
128 129

- **-r/--rec-per-req <rowNum\>** :
130
  Writing the number of rows of records per request to TDengine, the default value is 30000.
D
dingbo 已提交
131 132

- **-t/--tables <tableNum\>** :
133
  Specify the number of sub-tables. The default is 10000.
D
dingbo 已提交
134 135

- **-S/--timestampstep <stepLength\>** :
136
  Timestamp step for inserting data in each child table in ms, default is 1.
D
dingbo 已提交
137 138

- **-n/--records <recordNum\>** :
139
  The default value of the number of records inserted in each sub-table is 10000.
D
dingbo 已提交
140 141

- **-d/--database <dbName\>** :
142
  The name of the database used, the default value is `test`.
D
dingbo 已提交
143 144

- **-b/--data-type <colType\>** :
145
  specify the type of the data columns of the super table. It defaults to three columns of type FLOAT, INT, and FLOAT if not used.
D
dingbo 已提交
146 147

- **-l/--columns <colNum\>** :
148
  specify the number of columns in the super table. If both this parameter and `-b/--data-type` is set, the final result number of columns is the greater of the two. If the number specified by this parameter is greater than the number of columns specified by `-b/--data-type`, the unspecified column type defaults to INT, for example: `-l 5 -b float,double`, then the final column is `FLOAT,DOUBLE,INT,INT,INT`. If the number of columns specified is less than or equal to the number of columns specified by `-b/--data-type`, then the result is the column and type specified by `-b/--data-type`, e.g.: `-l 3 -b float,double,float,bigint`. The last column is `FLOAT,DOUBLE, FLOAT,BIGINT`.
D
dingbo 已提交
149 150

- **-A/--tag-type <tagType\>** :
151
  The tag column type of the super table. nchar and binary types can both set the length, for example:
D
dingbo 已提交
152 153 154 155 156

```
taosBenchmark -A INT,DOUBLE,NCHAR,BINARY(16)
```

157 158
If users did not set tag type, the default is two tags, whose types are INT and BINARY(16).
Note: In some shells, such as bash, "()" needs to be escaped, so the above command should be
D
dingbo 已提交
159 160 161 162 163 164

```
taosBenchmark -A INT,DOUBLE,NCHAR,BINARY\(16\)
```

- **-w/--binwidth <length\>**:
165
  specify the default length for nchar and binary types. The default value is 64.
D
dingbo 已提交
166 167

- **-m/--table-prefix <tablePrefix\>** :
168
  The prefix of the sub-table name, the default value is "d".
D
dingbo 已提交
169 170

- **-E/--escape-character** :
171
  Switch parameter specifying whether to use escape characters in the super table and sub-table names. By default is not used.
D
dingbo 已提交
172 173

- **-C/--chinese** :
D
dingbo 已提交
174
<<<<<<< HEAD
175
  Switch specifying whether to use Unicode Chinese characters in nchar and binary. By default is not used.
D
dingbo 已提交
176 177 178
=======
  specify whether to use Unicode Chinese characters in nchar and binary, the default is no.
>>>>>>> 108548b4d6 (docs: typo)
D
dingbo 已提交
179 180

- **-N/--normal-table** :
181
  This parameter indicates that taosBenchmark will create only normal tables instead of super tables. The default value is false. It can be used if the insert mode is taosc, stmt, and rest.
D
dingbo 已提交
182 183

- **-M/--random** :
184
  This parameter indicates writing data with random values. The default is false. If users use this parameter, taosBenchmark will generate the random values. For tag/data columns of numeric type, the value is a random value within the range of values of that type. For NCHAR and BINARY type tag columns/data columns, the value is the random string within the specified length range.
D
dingbo 已提交
185 186

- **-x/--aggr-func** :
187
  Switch parameter to indicate query aggregation function after insertion. The default value is false.
D
dingbo 已提交
188 189

- **-y/--answer-yes** :
190
  Switch parameter that requires the user to confirm at the prompt to continue. The default value is false.
D
dingbo 已提交
191 192

- **-O/--disorder <Percentage\>** :
193
  Specify the percentage probability of disordered data, with a value range of [0,50]. The default is 0, i.e., there is no disordered data.
D
dingbo 已提交
194 195

- **-R/--disorder-range <timeRange\>** :
196
  Specify the timestamp range for the disordered data. It leads the resulting disorder timestamp as the ordered timestamp minus a random value in this range. Valid only if the percentage of disordered data specified by `-O/--disorder` is greater than 0.
D
dingbo 已提交
197 198

- **-F/--prepare_rand <Num\>** :
199
  Specify the number of unique values in the generated random data. A value of 1 means that all data are equal. The default value is 10000.
D
dingbo 已提交
200 201

- **-a/--replica <replicaNum\>** :
202
  Specify the number of replicas when creating the database. The default value is 1.
D
dingbo 已提交
203 204

- **-V/--version** :
205
  Show version information only. Users should not use it with other parameters.
D
dingbo 已提交
206

207 208
- **-? /--help** :
  Show help information and exit. Users should not use it with other parameters.
D
dingbo 已提交
209

210
## Configuration file parameters in detailed
D
dingbo 已提交
211

212
### General configuration parameters
D
dingbo 已提交
213

214
The parameters listed in this section apply to all function modes.
D
dingbo 已提交
215

216 217
- **filetype** : The function to be tested, with optional values `insert`, `query` and `subscribe`. These correspond to the insert, query, and subscribe functions, respectively. Users can specify only one of these in each configuration file.
**cfgdir**: specify the TDengine cluster configuration file's directory. The default path is /etc/taos.
D
dingbo 已提交
218

219
- **host**: Specify the FQDN of the TDengine server to connect. The default value is `localhost`.
D
dingbo 已提交
220

221
- **port**: The port number of the TDengine server to connect to, the default value is `6030`.
D
dingbo 已提交
222

223
- **user**: The user name of the TDengine server to connect to, the default is `root`.
D
dingbo 已提交
224

225
- **password**: The password to connect to the TDengine server, the default value is `taosdata`.
D
dingbo 已提交
226

227
### Insert scenario configuration parameters
D
dingbo 已提交
228

229
`filetype` must be set to `insert` in the insertion scenario. See [General Configuration Parameters](#General Configuration Parameters)
D
dingbo 已提交
230

231
#### Database related configuration parameters
D
dingbo 已提交
232

233
The parameters related to database creation are configured in `dbinfo` in the json configuration file, as follows. These parameters correspond to the database parameters specified when `create database` in TDengine.
D
dingbo 已提交
234

235
- **name**: specify the name of the database.
D
dingbo 已提交
236

237
- **drop**: indicate whether to delete the database before inserting. The value can be 'yes' or 'no'. No means do not drop. The default is to drop.
D
dingbo 已提交
238

239
- **replica**: specify the number of replicas when creating the database.
D
dingbo 已提交
240

241
- **days**: specify the time span for storing data in a single data file. The default is 10.
D
dingbo 已提交
242

243
- **cache**: specify the size of the cache blocks in MB. The default value is 16.
D
dingbo 已提交
244

245
- **blocks**: specify the number of cache blocks in each vnode. The default is 6.
D
dingbo 已提交
246

247
- **precision**: specify the database time precision. The default value is "ms".
D
dingbo 已提交
248

249
- **keep**: specify the number of days to keep the data. The default value is 3650.
D
dingbo 已提交
250

251
- **minRows**: specify the minimum number of records in the file block. The default value is 100.
D
dingbo 已提交
252

253
- **maxRows**: specify the maximum number of records in the file block. The default value is 4096.
D
dingbo 已提交
254

255
- **comp**: specify the file compression level. The default value is 2.
D
dingbo 已提交
256

257
- **walLevel** : specify WAL level, default is 1.
D
dingbo 已提交
258

259
- **cacheLast**: indicate whether to allow the last record of each table to be kept in memory. The default value is 0. The value can be 0, 1, 2, or 3.
D
dingbo 已提交
260

261
- **quorum**: specify the number of writing acknowledgments in multi-replica mode. The default value is 1.
D
dingbo 已提交
262

263
- **fsync**: specify the interval of fsync in ms when users set WAL to 2. The default value is 3000.
D
dingbo 已提交
264

265
- **update** : indicate whether to support data update, default value is 0, optional values are 0, 1, 2.
D
dingbo 已提交
266

267
#### Super table related configuration parameters
D
dingbo 已提交
268

269
The parameters for creating super tables are configured in `super_tables` in the json configuration file, as shown below.
D
dingbo 已提交
270

271 272
- **name**: Super table name, mandatory, no default value.
- **child_table_exists** : whether the child table already exists, default value is "no", optional value is "yes" or "no".
D
dingbo 已提交
273

274
- **child_table_count** : The number of child tables, the default value is 10.
D
dingbo 已提交
275

276
- **child_table_prefix** : The prefix of the child table name, mandatory configuration item, no default value.
D
dingbo 已提交
277

278
- **escape_character**: specify the super table and child table names containing escape characters. The value can be "yes" or "no". The default is "no".
D
dingbo 已提交
279

280
- **auto_create_table**: only when insert_mode is taosc, rest, stmt, and childtable_exists is "no". "yes" means taosBenchmark will automatically create non-existent tables when inserting data; "no" means that taosBenchmark will create all tables before inserting.
D
dingbo 已提交
281

282
- **batch_create_tbl_num** : the number of tables per batch when creating sub-tables, default is 10. Note: the actual number of batches may not be the same as this value. If the executed SQL statement is larger than the maximum length supported, it will be automatically truncated and re-executed to continue creating.
D
dingbo 已提交
283

284
- **data_source**: specify the source of data-generation. Default is taosBenchmark randomly generated. Users can configure it as "rand" and "sample". When "sample" is used, taosBenchmark will use the data in the file specified by the `sample_file` parameter.
D
dingbo 已提交
285

286
- **insert_mode**: insertion mode with options taosc, rest, stmt, sml, sml-rest, corresponding to normal write, restful interface write, parameter binding interface write, schemaless interface write, restful schemaless interface write (provided by taosAdapter). The default value is taosc.
D
dingbo 已提交
287

288
- **non_stop_mode**: Specify whether to keep writing. If "yes", insert_rows will be disabled, and writing will not stop until Ctrl + C stops the program. The default value is "no", i.e., taosBenchmark will stop the writing after the specified number of rows are written. Note: insert_rows must be configured as a non-zero positive integer even if it fails in continuous write mode.
D
dingbo 已提交
289

290
- **line_protocol**: Insert data using line protocol. Only works when insert_mode is sml or sml-rest. The value can be `line`, `telnet`, or `json`.
D
dingbo 已提交
291

292
- **tcp_transfer**: Communication protocol in telnet mode only takes effect when insert_mode is sml-rest, and line_protocol is telnet. If not configured, the default protocol is http.
D
dingbo 已提交
293

294
- **insert_rows** : The number of inserted rows per child table, default is 0.
D
dingbo 已提交
295

296
- **childtable_offset**: Effective only if childtable_exists is yes, specifies the offset when fetching the list of child tables from the super table, i.e., starting from the first child table.
D
dingbo 已提交
297

298
- **childtable_limit**: Effective only when childtable_exists is yes, specifies the upper limit for fetching the list of child tables from the super table.
D
dingbo 已提交
299

300
- **interlace_rows**: Enables interleaved insertion mode and specifies the number of rows of data to be inserted into each child table at a time. Staggered insertion mode means inserting the number of rows specified by this parameter into each sub-table and repeating the process until all sub-tables have been inserted. The default value is 0, i.e., data is inserted into one sub-table before the next sub-table is inserted.
D
dingbo 已提交
301

302
- **insert_interval** : Specifies the insertion interval in ms for interleaved insertion mode. The default value is 0. It only works if `-B/--interlace-rows` is greater than 0. After inserting interlaced rows for each child table, the data insertion thread will wait for the interval specified by this value before proceeding to the next round of writes.
D
dingbo 已提交
303

304
- **partial_col_num**: If this value is a positive number n, only the first n columns are written to, only if insert_mode is taosc and rest, or all columns if n is 0.
D
dingbo 已提交
305

306
- **disorder_ratio** : Specifies the percentage probability of disordered (i.e. out-of-order) data in the value range [0,50]. The default is 0, which means there is no disorder data.
D
dingbo 已提交
307

308
- **disorder_range** : Specifies the timestamp fallback range for the disordered  data. The disordered timestamp is generated by subtracting a random value in this range, from the timestamp that would be used in the non-disorder case. Valid only if the percentage of disordered data specified by `-O/--disorder` is greater than 0.
D
dingbo 已提交
309

310
- **timestamp_step**: The timestamp step for inserting data in each child table, in units consistent with the `precision` of the database. For e.g. if the `precision` is milliseconds, the timestamp step will be in milliseconds. The default value is 1.
D
dingbo 已提交
311

312
- **start_timestamp** : The timestamp start value of each sub-table, the default value is now.
D
dingbo 已提交
313

314
- **sample_format**: The type of the sample data file; for now only "csv" is supported.
D
dingbo 已提交
315

316
- **sample_file**: Specify a CSV format file as the data source. It only works when data_source is a sample. If the number of rows in the CSV file is less than or equal to prepared_rand, then taosBenchmark will read the CSV file data cyclically until it is the same as prepared_rand; otherwise, taosBenchmark will read only the rows with the number of prepared_rand. The final number of rows of data generated is the smaller of the two.
D
dingbo 已提交
317

318
- **use_sample_ts**: effective only when data_source is `sample`, indicates whether the CSV file specified by sample_file contains the first timestamp column. Default is no. If set to yes, the first column of the CSV file is used as `timestamp`. Since the timestamp of the same sub-table cannot be repeated, the amount of data generated depends on the same number of rows of data in the CSV file, and insert_rows will be invalidated.
D
dingbo 已提交
319

320
- **tags_file** : only works when insert_mode is taosc, rest. The final tag value is related to the childtable_count. Suppose the tag data rows in the CSV file are smaller than the given number of child tables. In that case, taosBenchmark will read the CSV file data cyclically until the number of child tables specified by childtable_count is generated. Otherwise, taosBenchmark will read the childtable_count rows of tag data only. The final number of child tables generated is the smaller of the two.
D
dingbo 已提交
321

322
#### Tag and Data Column Configuration Parameters
D
dingbo 已提交
323

324
The configuration parameters for specifying super table tag columns and data columns are in `columns` and `tag` in `super_tables`, respectively.
D
dingbo 已提交
325

326 327
- **type**: Specify the column type. For optional values, please refer to the data types supported by TDengine.
  Note: JSON data type is unique and can only be used for tags. When using JSON type as a tag, there is and can only be this one tag. At this time, `count` and `len` represent the meaning of the number of key-value pairs within the JSON tag and the length of the value of each KV pair. Respectively, the value is a string by default.
D
dingbo 已提交
328

329
- **len**: Specifies the length of this data type, valid for NCHAR, BINARY, and JSON data types. If this parameter is configured for other data types, a value of 0 means that the column is always written with a null value; if it is not 0, it is ignored.
D
dingbo 已提交
330

331
- **count**: Specifies the number of consecutive occurrences of the column type, e.g., "count": 4096 generates 4096 columns of the specified type.
D
dingbo 已提交
332

333
- **name** : The name of the column, if used together with count, e.g. "name": "current", "count":3, then the names of the 3 columns are current, current_2. current_3.
D
dingbo 已提交
334

335
- **min**: The minimum value of the column/label of the data type.
D
dingbo 已提交
336

337
- **max**: The maximum value of the column/label of the data type.
D
dingbo 已提交
338

339
- **values**: The value field of the nchar/binary column/label, which will be chosen randomly from the values.
D
dingbo 已提交
340

341
#### insertion behavior configuration parameters
D
dingbo 已提交
342

343
- **thread_count**: specify the number of threads to insert data. Default is 8.
D
dingbo 已提交
344

345
- **create_table_thread_count** : The number of threads to build the table, default is 8.
D
dingbo 已提交
346

347
- **connection_pool_size** : The number of pre-established connections to the TDengine server. If not configured, it is the same as number of threads specified.
D
dingbo 已提交
348

349
- **result_file** : The path to the result output file, the default value is . /output.txt.
D
dingbo 已提交
350

351
- **confirm_parameter_prompt**: The switch parameter requires the user to confirm after the prompt to continue. The default value is false.
D
dingbo 已提交
352

353 354
- **interlace_rows**: Enables interleaved insertion mode and specifies the number of rows of data to be inserted into each child table at a time. Interleaved insertion mode means inserting the number of rows specified by this parameter into each sub-table and repeating the process until all sub-tables are inserted. The default value is 0, which means that data will be inserted into the following child table only after data is inserted into one child table.
  This parameter can also be configured in `super_tables`, and if so, the configuration in `super_tables` takes precedence and overrides the global setting.
D
dingbo 已提交
355 356

- **insert_interval** :
357 358
  Specifies the insertion interval in ms for interleaved insertion mode. The default value is 0. Only works if `-B/--interlace-rows` is greater than 0. It means that after inserting interlace rows for each child table, the data insertion thread will wait for the interval specified by this value before proceeding to the next round of writes.
  This parameter can also be configured in `super_tables`, and if configured, the configuration in `super_tables` takes high priority, overriding the global setting.
D
dingbo 已提交
359 360

- **num_of_records_per_req** :
361
  The number of rows of data to be written per request to TDengine, the default value is 30000. When it is set too large, the TDengine client driver will return the corresponding error message, so you need to lower the setting of this parameter to meet the writing requirements.
D
dingbo 已提交
362

363
- **prepare_rand**: The number of unique values in the generated random data. A value of 1 means that all data are the same. The default value is 10000.
D
dingbo 已提交
364

365
### Query scenario configuration parameters
D
dingbo 已提交
366

367
`filetype` must be set to `query` in the query scenario. See [General Configuration Parameters](#General Configuration Parameters) for details of this parameter and other general parameters
D
dingbo 已提交
368

369
#### Configuration parameters for executing the specified query statement
D
dingbo 已提交
370

371
The configuration parameters for querying the sub-tables or the normal tables are set in `specified_table_query`.
D
dingbo 已提交
372

373
- **query_interval** : The query interval in seconds, the default value is 0.
D
dingbo 已提交
374

375
- **threads**: The number of threads to execute the query SQL, the default value is 1.
D
dingbo 已提交
376

377 378
- **sqls**.
  - **sql**: the SQL command to be executed.
D
dingbo 已提交
379
  - **result**: the file to save the query result. If it is unspecified, taosBenchmark will not save the result.
D
dingbo 已提交
380

381
#### Configuration parameters of query super table
D
dingbo 已提交
382

383
The configuration parameters of the super table query are set in `super_table_query`.
D
dingbo 已提交
384

385
- **stblname**: Specify the name of the super table to be queried, required.
D
dingbo 已提交
386

387
- **query_interval** : The query interval in seconds, the default value is 0.
D
dingbo 已提交
388

389
- **threads**: The number of threads to execute the query SQL, the default value is 1.
D
dingbo 已提交
390

391 392 393 394
- **sqls** : The default value is 1.
  - **sql**: The SQL command to be executed. For the query SQL of super table, keep "xxxx" in the SQL command. The program will automatically replace it with all the sub-table names of the super table.
    Replace it with all the sub-table names in the super table.
  - **result**: The file to save the query result. If not specified, taosBenchmark will not save result.
D
dingbo 已提交
395

396
### Subscription scenario configuration parameters
D
dingbo 已提交
397

398
`filetype` must be set to `subscribe` in the subscription scenario. See [General Configuration Parameters](#General Configuration Parameters) for details of this and other general parameters
D
dingbo 已提交
399

400
#### Configuration parameters for executing the specified subscription statement
D
dingbo 已提交
401

402
The configuration parameters for subscribing to a sub-table or a generic table are set in `specified_table_query`.
D
dingbo 已提交
403

404
- **threads**: The number of threads to execute SQL, default is 1.
D
dingbo 已提交
405

406
- **interval**: The time interval to execute the subscription, in seconds, default is 0.
D
dingbo 已提交
407

408
- **restart** : "yes" means start a new subscription, "no" means continue the previous subscription, the default value is "no".
D
dingbo 已提交
409

410
- **keepProgress**: "yes" means keep the progress of the subscription, "no" means don't keep it, and the default value is "no".
D
dingbo 已提交
411

412
- **resubAfterConsume**: "yes" means cancel the previous subscription and then subscribe again, "no" means continue the previous subscription, and the default value is "no".
D
dingbo 已提交
413

414 415 416
- **sqls** : The default value is "no".
  - **sql** : The SQL command to be executed, required.
  - **result** : The file to save the query result, unspecified is not saved.
D
dingbo 已提交
417

418
#### Configuration parameters for subscribing to supertables
D
dingbo 已提交
419

420
The configuration parameters for subscribing to a super table are set in `super_table_query`.
D
dingbo 已提交
421

422
- **stblname**: The name of the super table to subscribe.
D
dingbo 已提交
423

424
- **threads**: The number of threads to execute SQL, default is 1.
D
dingbo 已提交
425

426
- **interval**: The time interval to execute the subscription, in seconds, default is 0.
D
dingbo 已提交
427

428
- **restart** : "yes" means start a new subscription, "no" means continue the previous subscription, the default value is "no".
D
dingbo 已提交
429

430
- **keepProgress**: "yes" means keep the progress of the subscription, "no" means don't keep it, and the default value is "no".
D
dingbo 已提交
431

432
- **resubAfterConsume**: "yes" means cancel the previous subscription and then subscribe again, "no" means continue the previous subscription, and the default value is "no".
D
dingbo 已提交
433

434 435 436 437
- **sqls** : The default value is "no".
  - **sql**: SQL command to be executed, required; for the query SQL of the super table, keep "xxxx" in the SQL command, and the program will replace it with all the sub-table names of the super table automatically.
    Replace it with all the sub-table names in the super table.
  - **result**: The file to save the query result, if not specified, it will not be saved.