You need to sign in or sign up before continuing.
19-limit.md 3.5 KB
Newer Older
1
---
2
title: Name and Size Limits
D
danielclow 已提交
3 4
sidebar_label: Name and Size Limits
description: This document describes the name and size limits in TDengine.
5 6
---

7
## Naming Rules
8

9 10 11 12 13 14
1. Names can include letters, digits, and underscores (_).
2. Names can begin with letters or underscores (_) but not with digits.
3. Names are not case-sensitive.
4. Rules for names with escape characters are as follows:
   You can escape a name by enclosing it in backticks (`). In this way, you can reuse keyword names for table names. However, the first three naming rules no longer apply.
   Table and column names that are enclosed in escape characters are still subject to length limits. When the length of such a name is calculated, the escape characters are not included. Names specified using escape character are case-sensitive.
15

16 17
   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.
18

19
## Password Rules
20 21 22

`[a-zA-Z0-9!?$%^&*()_–+={[}]:;@~#|<,>.?/]`

23
The following characters cannot occur in a password: single quotation marks ('), double quotation marks ("), backticks (`), backslashes (\\), and spaces.
24

25
## General Limits
26

X
Xiaoyu Wang 已提交
27
- Maximum length of database name is 64 bytes
28
- Maximum length of table name is 192 bytes, excluding the database name prefix and the separator.
29
- Maximum length of each data row is 48K(64K since version 3.0.5.0) bytes. Note that the upper limit includes the extra 2 bytes consumed by each column of BINARY/NCHAR type.
30 31 32 33
- 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 number of tags is 128. There must be at least 1 tag. The total length of tag values cannot exceed 16 KB.
W
wade zhang 已提交
34
- Maximum length of single SQL statement is 1 MB (1048576 bytes). 
35 36 37 38
- 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.
X
Xiaoyu Wang 已提交
39
- The maximum length of a password is 128 bytes.
40 41
- The maximum number of rows depends on system resources.
- The maximum number of vnodes in a database is 1024.
42

43
## Restrictions of Table/Column Names
44

45
### Name Restrictions of Table/Column
46

47
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.
48

49
### Name Restrictions After Escaping
50

51 52
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.
53

54 55
For example:
\`aBc\` and \`abc\` are different table or column names, but "abc" and "aBc" are same names because internally they are all "abc".
56 57

:::note
58
The characters inside escape characters must be printable characters.
59 60

:::