Skip to content

Commit 795f69c

Browse files
authored
ddl: add column limit (pingcap#355)
Via: pingcap/docs-cn#582
1 parent 24f190a commit 795f69c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sql/ddl.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ The `CREATE INDEX` statement is used to create the index for an existing table.
329329
- The `index_option` supports `KEY_BLOCK_SIZE`, `index_type` and `COMMENT`. The `COMMENT` supports a maximum of 1024 characters and does not support the `WITH PARSER` option.
330330
- The `index_type` supports `BTREE` and `HASH` only in MySQL syntax, which means the index type is independent of the storage engine option in the creating table statement. For example, in MySQL, when you use `CREATE INDEX` on a table using InnoDB, it only supports the `BTREE` index, while TiDB supports both `BTREE` and `HASH` indexes.
331331
- The `CREATE INDEX` does not support the `algorithm_option` and `lock_option` in MySQL.
332+
- TiDB supports at most 512 columns in a single table. The corresponding number limit in InnoDB is 1017, and the hard limit in MySQL is 4096. For more details, see [Limits on Table Column Count and Row Size](https://dev.mysql.com/doc/refman/5.7/en/column-count-limit.html).
332333

333334
## DROP INDEX syntax
334335

0 commit comments

Comments
 (0)