TDengine数据库每行最大长度可以超过16k字符
max length of each data row can be more than 16k characters in TDengine database
根据官方文档,每个数据行的最大长度为 16k 个字符,但我仍然可以成功创建一个每行超过 16k 个字符的table。
taos> create table tb1(ts timestamp, c1 binary(1024), c2 binary(1024), c3 binary(1024), c4 binary(1024), c5 binary(1024), c6 binary(1024), c7 binary(1024), c8 binary(1024), c9 b
inary(1024), c10 binary(1024), c11 binary(1024), c12 binary(1024), c13 binary(1024), c14 binary(1024), c15 binary(1024), c16 binary(1024));
Query OK, 0 of 0 row(s) in database (0.004552s)
taos> show tables;
table_name | created_time | columns | stable_name | uid | tid | vgId |
==========================================================================================================================================================
tb1 | 2021-09-30 22:01:21.181 | 17 | | 844424997251312 | 4 | 3 |
Query OK, 1 row(s) in set (0.002585s)
每个数据行的最大长度是多少?
不知道你用的是哪个版本的TDengine,从最新的官方文档来看:
Maximum length of record: including 8 bytes as timestamp, no more than 48K bytes (it's 16K bytes prior to 2.1.7.0. each column of BINARY/NCHAR type will occupy an additional 2 bytes of storage location)
根据官方文档,每个数据行的最大长度为 16k 个字符,但我仍然可以成功创建一个每行超过 16k 个字符的table。
taos> create table tb1(ts timestamp, c1 binary(1024), c2 binary(1024), c3 binary(1024), c4 binary(1024), c5 binary(1024), c6 binary(1024), c7 binary(1024), c8 binary(1024), c9 b
inary(1024), c10 binary(1024), c11 binary(1024), c12 binary(1024), c13 binary(1024), c14 binary(1024), c15 binary(1024), c16 binary(1024));
Query OK, 0 of 0 row(s) in database (0.004552s)
taos> show tables;
table_name | created_time | columns | stable_name | uid | tid | vgId |
==========================================================================================================================================================
tb1 | 2021-09-30 22:01:21.181 | 17 | | 844424997251312 | 4 | 3 |
Query OK, 1 row(s) in set (0.002585s)
每个数据行的最大长度是多少?
不知道你用的是哪个版本的TDengine,从最新的官方文档来看:
Maximum length of record: including 8 bytes as timestamp, no more than 48K bytes (it's 16K bytes prior to 2.1.7.0. each column of BINARY/NCHAR type will occupy an additional 2 bytes of storage location)