Name and Size Limits
Names are not case-sensitive.
-
For example, `aBc` and `abc` are different table or column names, but “abc” and “aBc” are same names because internally they are all “abc”. Only ASCII visible characters can be used with escape character.
- Maximum length of database name is 64 bytes
- Maximum length of table name is 192 bytes, excluding the database name prefix and the separator.
- Maximum length of each data row is 48K bytes. Note that the upper limit includes the extra 2 bytes consumed by each column of BINARY/NCHAR type.
- The maximum length of a column name is 64 bytes.
- Maximum number of columns is 4096. There must be at least 2 columns, and the first column must be timestamp.
- The maximum length of a tag name is 64 bytes
- Maximum length of single SQL statement is 1 MB (1048576 bytes).
- At most 4096 columns can be returned by
SELECT
. Functions in the query statement constitute columns. An error is returned if the limit is exceeded. - Maximum numbers of databases, STables, tables are dependent only on the system resources.
- The number of replicas can only be 1 or 3.
- The maximum length of a username is 23 bytes.
- The maximum length of a password is 128 bytes.
- The maximum number of rows depends on system resources.
- The maximum number of vnodes in a database is 1024.
The name of a table or column can only be composed of ASCII characters, digits and underscore and it cannot start with a digit. The maximum length is 192 bytes. Names are case insensitive. The name mentioned in this rule doesn’t include the database name prefix and the separator.
Name Restrictions After Escaping
To support more flexible table or column names, new escape character “`“ is introduced in TDengine to avoid the conflict between table name and keywords and break the above restrictions for table names. The escape character is not counted in the length of table name. With escaping, the string inside escape characters are case sensitive, i.e. will not be converted to lower case internally. The table names specified using escape character are case sensitive.
note
The characters inside escape characters must be printable characters.