Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic features: convert to matrix #3960

Closed
wants to merge 29 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3b8727b
basic features: convert to matrix
Sep 24, 2020
ec8a887
Merge branch 'master' into update-features
Sep 24, 2020
7f28102
Address PR feedback
Sep 25, 2020
074d58b
Merge branch 'update-features' of github.com:nullnotnil/docs into upd…
Sep 25, 2020
3eec03b
Merge branch 'master' into update-features
Oct 12, 2020
bc8e89a
fix footnote
Oct 13, 2020
1d587fa
Merge branch 'master' into update-features
Oct 13, 2020
618c227
Update 5.0 to development
Oct 19, 2020
83759a9
Merge branch 'master' into update-features
Oct 19, 2020
e2dbe6e
Update basic-features.md
Oct 28, 2020
a5b2af0
Update basic-features.md
Oct 28, 2020
efd66aa
Update basic-features.md
Oct 28, 2020
6ba0de1
Update basic-features.md
Oct 28, 2020
00c9932
Update basic-features.md
Oct 28, 2020
91d8f36
Update basic-features.md
Oct 28, 2020
4b11996
Update basic-features.md
Oct 28, 2020
bc3d221
Update basic-features.md
Oct 28, 2020
3b7236c
Update basic-features.md
Oct 28, 2020
d55b7b5
Remove link from collations
Oct 28, 2020
479d026
Merge branch 'master' into update-features
TomShawn Nov 4, 2020
6e6d411
Merge branch 'master' into update-features
TomShawn Nov 4, 2020
93726c2
Update basic-features.md
TomShawn Nov 4, 2020
d1ac870
Merge branch 'master' into update-features
yikeke Nov 6, 2020
64c6984
Merge branch 'master' into update-features
yikeke Nov 6, 2020
06ba049
Merge branch 'master' into update-features
yikeke Nov 6, 2020
31ca698
Merge branch 'master' into update-features
Nov 9, 2020
83bda51
Merge branch 'master' into update-features
Dec 1, 2020
17b7d64
Merge branch 'master' into update-features
Dec 2, 2020
f7cba36
Merge branch 'master' into update-features
Dec 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 124 additions & 74 deletions basic-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,127 @@ summary: Learn about the basic features of TiDB.
aliases: ['/docs/dev/basic-features/']
---

# TiDB Basic Features

This document introduces the basic features of TiDB.

## Data types

- Numeric types: `BIT`, `BOOL|BOOLEAN`, `SMALLINT`, `MEDIUMINT`, `INT|INTEGER`, `BIGINT`, `FLOAT`, `DOUBLE`, `DECIMAL`.

- Date and time types: `DATE`, `TIME`, `DATETIME`, `TIMESTAMP`, `YEAR`.

- String types: `CHAR`, `VARCHAR`, `TEXT`, `TINYTEXT`, `MEDIUMTEXT`, `LONGTEXT`, `BINARY`, `VARBINARY`, `BLOB`, `TINYBLOB`, `MEDIUMBLOB`, `LONGBLOB`, `ENUM`, `SET`.

- The `JSON` type.

## Operators

- Arithmetic operators, bit operators, comparison operators, logical operators, date and time operators, and so on.

## Character sets and collations

- Character sets: `UTF8`, `UTF8MB4`, `BINARY`, `ASCII`, `LATIN1`.

- Collations: `UTF8MB4_GENERAL_CI`, `UTF8MB4_UNICODE_CI`, `UTF8MB4_GENERAL_BIN`, `UTF8_GENERAL_CI`, `UTF8_UNICODE_CI`, `UTF8_GENERAL_BIN`, `BINARY`.

## Functions

- Control flow functions, string functions, date and time functions, bit functions, data type conversion functions, data encryption and decryption functions, compression and decompression functions, information functions, JSON functions, aggregation functions, window functions, and so on.

## SQL statements

- Fully supports standard Data Definition Language (DDL) statements, such as `CREATE`, `DROP`, `ALTER`, `RENAME`, `TRUNCATE`, and so on.

- Fully supports standard Data Manipulation Language (DML) statements, such as `INSERT`, `REPLACE`, `SELECT`, subqueries, `UPDATE`, `LOAD DATA`, and so on.

- Fully supports standard transactional and locking statements, such as `START TRANSACTION`, `COMMIT`, `ROLLBACK`, `SET TRANSACTION`, and so on.

- Fully supports standard database administration statements, such as `SHOW`, `SET`, and so on.

- Fully supports standard utility statements, such as `DESCRIBE`, `EXPLAIN`, `USE`, and so on.

- Fully supports the `GROUP BY` and `ORDER BY` clauses.

- Fully supports the standard `LEFT OUTER JOIN` and `RIGHT OUTER JOIN` SQL statements.

- Fully supports the standard SQL table and column aliases.

## Partitioning

- Supports Range partitioning
- Supports Hash partitioning

## Views

- Supports general views

## Constraints

- Supports non-empty constraints
- Supports primary key constraints
- Supports unique constraints

## Security

- Supports privilege management based on RBAC (role-based access control)
- Supports password management
- Supports communication and data encryption
- Supports IP allowlist
- Supports audit

## Tools

- Supports fast backup
- Supports data migration from MySQL to TiDB using tools
- Supports deploying and maintaining TiDB using tools
# TiDB Features

The following table provides an overview of the feature development history of TiDB. Note that TiDB 5.0 is under active development, and the final feature set may change before release.

| Data types, functions and operators | 5.0 | 4.0 | 3.1 | 3.0 | 2.1 |
|--------------------------------------------------------------------------------------|:-----:|:---:|:---:|:---:|:---:|
| [Numeric types](/data-type-numeric.md) | Y | Y | Y | Y | Y |
| [Date and time types](/data-type-date-and-time.md) | Y | Y | Y | Y | Y |
| [String types](/data-type-string.md) | Y | Y | Y | Y | Y |
| [JSON type](/data-type-json.md) | Experimental | Experimental | Experimental | Experimental | Experimental |
| [Control flow functions](/functions-and-operators/control-flow-functions.md) | Y | Y | Y | Y | Y |
| [String functions](/functions-and-operators/string-functions.md) | Y | Y | Y | Y | Y |
| [Numeric functions and operators](/functions-and-operators/numeric-functions-and-operators.md) | Y | Y | Y | Y | Y |
| [Date and time functions](/functions-and-operators/date-and-time-functions.md) | Y | Y | Y | Y | Y |
| [Bit functions and operators](/functions-and-operators/bit-functions-and-operators.md) | Y | Y | Y | Y | Y |
| [Cast functions and operators](/functions-and-operators/cast-functions-and-operators.md) | Y | Y | Y | Y | Y |
| [Encryption and compression functions](/functions-and-operators/encryption-and-compression-functions.md) | Y | Y | Y | Y | Y |
| [Information functions](/functions-and-operators/information-functions.md) | Y | Y | Y | Y | Y |
| [JSON functions](/functions-and-operators/json-functions.md) | Experimental | Experimental | Experimental | Experimental | Experimental |
| [Aggregation functions](/functions-and-operators/aggregate-group-by-functions.md) | Y | Y | Y | Y | Y |
| [Window functions](/functions-and-operators/window-functions.md) | Y | Y | Y | Y | Y |
| [Miscellaneous functions](/functions-and-operators/miscellaneous-functions.md) | Y | Y | Y | Y | Y |
| [Operators](/functions-and-operators/operators.md) | Y | Y | Y | Y | Y |
| **Character sets** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
This conversation was marked as resolved.
Show resolved Hide resolved
| [`utf8`](/character-set-and-collation.md) | Y | Y | Y | Y | Y |
| [`utf8mb4`](/character-set-and-collation.md) | Y | Y | Y | Y | Y |
| [`ascii`](/character-set-and-collation.md)[1] | Y | Y | Y | Y | Y |
This conversation was marked as resolved.
Show resolved Hide resolved
| [`latin1`](/character-set-and-collation.md) | Y | Y | Y | Y | Y |
| [`binary`](/character-set-and-collation.md) | Y | Y | Y | Y | Y |
| **Collations** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| [`utf8_bin`](/character-set-and-collation.md) | Y | Y | Y | Y | Y |
| [`utf8_general_ci`](/character-set-and-collation.md) | Experimental | Experimental | N | N | N |
| [`utf8_unicode_ci`](/character-set-and-collation.md) | Experimental | Experimental | N | N | N |
| [`utf8mb4_bin`](/character-set-and-collation.md) | Y | Y | Y | Y | Y |
| [`utf8mb4_general_ci`](/character-set-and-collation.md) | Experimental | Experimental | N | N | N |
| [`utf8mb4_unicode_ci`](/character-set-and-collation.md) | Experimental | Experimental | N | N | N |
| [`ascii_bin`](/character-set-and-collation.md) | Y | Y | Y | Y | Y |
| [`latin1_bin`](/character-set-and-collation.md) | Y | Y | Y | Y | Y |
| [`binary`](/character-set-and-collation.md) | Y | Y | Y | Y | Y |
| **Indexing and constraints** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| Expression Indexes | Experimental | Experimental | N | N | N |
This conversation was marked as resolved.
Show resolved Hide resolved
| [Columnar Storage (TiFlash)](/tiflash/tiflash-overview.md) | Y | Y | Y | N | N |
This conversation was marked as resolved.
Show resolved Hide resolved
| [RocksDB Engine](/storage-engine/rocksdb-overview.md) | Y | Y | Y | Y | Y |
This conversation was marked as resolved.
Show resolved Hide resolved
| [Titan Plugin](/storage-engine/titan-overview.md) | Y | Y | Experimental | Experimental | Experimental |
| [Invisible Indexes](/sql-statements/sql-statement-add-index.md) | Y | N | N | N | N |
This conversation was marked as resolved.
Show resolved Hide resolved
| [Composite `PRIMARY KEY`](/constraints.md) | Y | Y | Y | Y | Y |
| [Unique indexes](/constraints.md) | Y | Y | Y | Y | Y |
| [Clustered index on integer `PRIMARY KEY`](/constraints.md) | Y | Y | Y | Y | Y |
| [Clustered index on composite or non-integer key](/constraints.md) | Experimental | N | N | N | N |
This conversation was marked as resolved.
Show resolved Hide resolved
| **SQL statements** [2] | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| Basic `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `REPLACE` | Y | Y | Y | Y | Y |
| `INSERT ON DUPLICATE KEY UPDATE` | Y | Y | Y | Y | Y |
| `LOAD DATA INFILE` | Y | Y | Y | Y | Y |
| `SELECT INTO OUTFILE` | Y | Y | N | N | N |
| `INNER JOIN`, `LEFT\|RIGHT [OUTER] JOIN` | Y | Y | Y | Y | Y |
| `UNION`, `UNION ALL` | Y | Y | Y | Y | Y |
| `GROUP BY`, `ORDER BY` | Y | Y | Y | Y | Y |
| `START TRANSACTION`, `COMMIT`, `ROLLBACK` | Y | Y | Y | Y | Y |
| [`EXPLAIN`](/sql-statements/sql-statement-explain.md) | Y | Y | Y | Y | Y |
| [`EXPLAIN ANALYZE`](/sql-statements/sql-statement-explain-analyze.md) | Y | Y | Y | Y | Y |
| **Advanced SQL Features** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| Prepared statement cache | Y | Experimental | N | N | N |
This conversation was marked as resolved.
Show resolved Hide resolved
| [SQL plan management (SPM)](/sql-plan-management.md) | Y | Y | N | N | N |
| [Coprocessor cache](/coprocessor-cache.md) | Y | Experimental | N | N | N |
| [Placement rules](/configure-placement-rules.md) | Y | Y | N | N | N |
This conversation was marked as resolved.
Show resolved Hide resolved
| [Follower reads](/follower-read.md) | Y | Y | Y | N | N |
| [Read Historical Data (tidb_snapshot)](/read-historical-data.md) | Y | Y | Y | Y | Y |
| [Optimizer Hints](/optimizer-hints.md) | Y | Y | Y | Y | Y |
This conversation was marked as resolved.
Show resolved Hide resolved
| **Data definition language (DDL)** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| Basic `CREATE`, `DROP`, `ALTER`, `RENAME`, `TRUNCATE` | Y | Y | Y | Y | Y |
| [Generated columns](/generated-columns.md) | Experimental | Experimental | Experimental | Experimental | Experimental |
| [Views](/views.md) | Y | Y | Y | Y | N |
| [Sequences](/sql-statements/sql-statement-create-sequence.md) | Y | Y | N | N | N |
| [Auto increment](/auto-increment.md) | Y | Y | Y | Y | Y |
| [Auto random](/auto-random.md) | Y | Y | N | N | N |
| DDL algorithm assertions | Y | Y | N | N | N |
| Multi schema change: add column(s) | Y | N | N | N | N |
| **Transactions** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| Async commit | Y | N | N | N | N |
| Large transactions (10GB) | Y | Y | N | N | N |
| [Pessimistic transactions](/pessimistic-transaction.md) | Y | Y | Y | Y | Experimental |
| [Optimistic transactions](/optimistic-transaction.md) | Y | Y | Y | Y | Y |
| [Repeatable-read isolation (snapshot isolation)](/transaction-isolation-levels.md) | Y | Y | Y | Y | Y |
| [Read-committed isolation](/transaction-isolation-levels.md) | Y | Y | N | N | N |
| **Partitioning** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| [Range partitioning](/partitioned-table.md) | Y | Y | Y | Y | N |
| [Hash partitioning](/partitioned-table.md) | Y | Y | Y | Y | N |
| **Statistics** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| [CMSketch](/statistics.md) | Y | Y | Y | Y | Y |
This conversation was marked as resolved.
Show resolved Hide resolved
| [Histograms](/statistics.md) | Y | Y | Y | Y | Y |
| [Extended statistics (multiple columns)](/statistics.md) | Experimental | N | N | N | N |
This conversation was marked as resolved.
Show resolved Hide resolved
| **Security** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| [Transparent layer security (TLS)](/enable-tls-between-clients-and-servers.md) | Y | Y | Y | Y | Y |
| [Encryption at rest (TDE)](/encryption-at-rest.md) | Y | Y | N | N | N |
| [Role-based authentication (RBAC)](/role-based-access-control.md) | Y | Y | Y | Y | N |
| [Certificate-based authentication](/certificate-authentication.md) | Y | Y | Y | Y | N |
| Support for MySQL 8.0 clients | Y | Y | N | N | N |
| [MySQL compatible `GRANT` system](/privilege-management.md) | Y | Y | Y | Y | Y |
| Auditing | Y | Y | Y | Y | Y |
| **Data import and export** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| [Fast Importer (TiDB Lightning)](/tidb-lightning/tidb-lightning-overview.md) | Y | Y | Y | Y | Y |
| [mydumper logical dumper](/mydumper-overview.md) | Deprecated | Deprecated | Y | Y | Y |
| [dumpling logical dumper](/dumpling-overview.md) | Y | Y | N | N | N |
This conversation was marked as resolved.
Show resolved Hide resolved
| [Transactional `LOAD DATA`](/sql-statements/sql-statement-load-data.md) | Y | N | N | N | N |
| [Database migration toolkit (DM)](/migration-overview.md) | Y | Y | Y | Y | Y |
| [TiDB Binlog](/tidb-binlog/tidb-binlog-overview.md) | Deprecated | Deprecated | Y | Y | Y |
| [Change data capture (CDC)](/ticdc/ticdc-overview.md) | Y | Y | N | N | N |
| **Management, observability and tools** | **5.0** | **4.0** | **3.1** | **3.0** | **2.1** |
| [TiDB Dashboard](/dashboard/dashboard-intro.md) | Y | Y | N | N | N |
| [SQL diagnostics](/information-schema/information-schema-sql-diagnostics.md) | Experimental | Experimental | N | N | N |
| [Information schema](/information-schema/information-schema.md) | Y | Y | Y | Y | Y |
| [Metrics schema](/metrics-schema.md) | Y | Y | N | N | N |
| [Statements summary tables](/statement-summary-tables.md) | Y | Y | N | N | N |
| [Slow query log](/identify-slow-queries.md) | Y | Y | Y | Y | Y |
| [TiUP deployment](/tiup/tiup-overview.md) | Y | Y | N | N | N |
| [Ansible deployment](/online-deployment-using-ansible.md) | Deprecated | Deprecated | Y | Y | Y |
TomShawn marked this conversation as resolved.
Show resolved Hide resolved
| [Kubernetes operator](https://docs.pingcap.com/tidb-in-kubernetes/) | Y | Y | Y | Y | Y |
| [Built-in physical backup](/br/backup-and-restore-use-cases.md) | Y | Y | N | N | N |
| Point in time recovery (PITR) | Planned | N | N | N | N |
This conversation was marked as resolved.
Show resolved Hide resolved

Footnotes:

1. TiDB incorrectly treats latin1 as a subset of utf8. See [TiDB #18955](https://github.com/pingcap/tidb/issues/18955) for more details.
2. See [Statement Reference](/sql-statements/sql-statement-select.md) for a full list of SQL statements supported.