- Docs Home
- About TiDB
- Quick Start
- Develop
- Overview
- Quick Start
- Build a TiDB Cluster in TiDB Cloud (Developer Tier)
- CRUD SQL in TiDB
- Build a Simple CRUD App with TiDB
- Example Applications
- Connect to TiDB
- Design Database Schema
- Write Data
- Read Data
- Transaction
- Optimize
- Troubleshoot
- Reference
- Cloud Native Development Environment
- Third-party Support
- Deploy
- Software and Hardware Requirements
- Environment Configuration Checklist
- Plan Cluster Topology
- Install and Start
- Verify Cluster Status
- Test Cluster Performance
- Migrate
- Overview
- Migration Tools
- Migration Scenarios
- Migrate from Aurora
- Migrate MySQL of Small Datasets
- Migrate MySQL of Large Datasets
- Migrate and Merge MySQL Shards of Small Datasets
- Migrate and Merge MySQL Shards of Large Datasets
- Migrate from CSV Files
- Migrate from SQL Files
- Migrate from One TiDB Cluster to Another TiDB Cluster
- Migrate from TiDB to MySQL-compatible Databases
- Advanced Migration
- Integrate
- Maintain
- Monitor and Alert
- Troubleshoot
- TiDB Troubleshooting Map
- Identify Slow Queries
- Analyze Slow Queries
- SQL Diagnostics
- Identify Expensive Queries Using Top SQL
- Identify Expensive Queries Using Logs
- Statement Summary Tables
- Troubleshoot Hotspot Issues
- Troubleshoot Increased Read and Write Latency
- Save and Restore the On-Site Information of a Cluster
- Troubleshoot Cluster Setup
- Troubleshoot High Disk I/O Usage
- Troubleshoot Lock Conflicts
- Troubleshoot TiFlash
- Troubleshoot Write Conflicts in Optimistic Transactions
- Troubleshoot Inconsistency Between Data and Indexes
- Performance Tuning
- Tuning Guide
- Configuration Tuning
- System Tuning
- Software Tuning
- SQL Tuning
- Overview
- Understanding the Query Execution Plan
- SQL Optimization Process
- Overview
- Logic Optimization
- Physical Optimization
- Prepare Execution Plan Cache
- Control Execution Plans
- Tutorials
- TiDB Tools
- Overview
- Use Cases
- Download
- TiUP
- Documentation Map
- Overview
- Terminology and Concepts
- Manage TiUP Components
- FAQ
- Troubleshooting Guide
- Command Reference
- Overview
- TiUP Commands
- TiUP Cluster Commands
- Overview
- tiup cluster audit
- tiup cluster check
- tiup cluster clean
- tiup cluster deploy
- tiup cluster destroy
- tiup cluster disable
- tiup cluster display
- tiup cluster edit-config
- tiup cluster enable
- tiup cluster help
- tiup cluster import
- tiup cluster list
- tiup cluster patch
- tiup cluster prune
- tiup cluster reload
- tiup cluster rename
- tiup cluster replay
- tiup cluster restart
- tiup cluster scale-in
- tiup cluster scale-out
- tiup cluster start
- tiup cluster stop
- tiup cluster template
- tiup cluster upgrade
- TiUP DM Commands
- Overview
- tiup dm audit
- tiup dm deploy
- tiup dm destroy
- tiup dm disable
- tiup dm display
- tiup dm edit-config
- tiup dm enable
- tiup dm help
- tiup dm import
- tiup dm list
- tiup dm patch
- tiup dm prune
- tiup dm reload
- tiup dm replay
- tiup dm restart
- tiup dm scale-in
- tiup dm scale-out
- tiup dm start
- tiup dm stop
- tiup dm template
- tiup dm upgrade
- TiDB Cluster Topology Reference
- DM Cluster Topology Reference
- Mirror Reference Guide
- TiUP Components
- PingCAP Clinic Diagnostic Service
- TiDB Operator
- Dumpling
- TiDB Lightning
- TiDB Data Migration
- About TiDB Data Migration
- Architecture
- Quick Start
- Deploy a DM cluster
- Tutorials
- Advanced Tutorials
- Maintain
- Cluster Upgrade
- Tools
- Performance Tuning
- Manage Data Sources
- Manage Tasks
- Export and Import Data Sources and Task Configurations of Clusters
- Handle Alerts
- Daily Check
- Reference
- Architecture
- Command Line
- Configuration Files
- OpenAPI
- Compatibility Catalog
- Secure
- Monitoring and Alerts
- Error Codes
- Glossary
- Example
- Troubleshoot
- Release Notes
- Backup & Restore (BR)
- TiDB Binlog
- TiCDC
- Dumpling
- sync-diff-inspector
- TiSpark
- Reference
- Cluster Architecture
- Key Monitoring Metrics
- Secure
- Privileges
- SQL
- SQL Language Structure and Syntax
- SQL Statements
ADD COLUMNADD INDEXADMINADMIN CANCEL DDLADMIN CHECKSUM TABLEADMIN CHECK [TABLE|INDEX]ADMIN SHOW DDL [JOBS|QUERIES]ADMIN SHOW TELEMETRYALTER DATABASEALTER INDEXALTER INSTANCEALTER PLACEMENT POLICYALTER TABLEALTER TABLE COMPACTALTER USERANALYZE TABLEBACKUPBATCHBEGINCHANGE COLUMNCOMMITCHANGE DRAINERCHANGE PUMPCREATE [GLOBAL|SESSION] BINDINGCREATE DATABASECREATE INDEXCREATE PLACEMENT POLICYCREATE ROLECREATE SEQUENCECREATE TABLE LIKECREATE TABLECREATE USERCREATE VIEWDEALLOCATEDELETEDESCDESCRIBEDODROP [GLOBAL|SESSION] BINDINGDROP COLUMNDROP DATABASEDROP INDEXDROP PLACEMENT POLICYDROP ROLEDROP SEQUENCEDROP STATSDROP TABLEDROP USERDROP VIEWEXECUTEEXPLAIN ANALYZEEXPLAINFLASHBACK TABLEFLUSH PRIVILEGESFLUSH STATUSFLUSH TABLESGRANT <privileges>GRANT <role>INSERTKILL [TIDB]LOAD DATALOAD STATSMODIFY COLUMNPREPARERECOVER TABLERENAME INDEXRENAME TABLEREPLACERESTOREREVOKE <privileges>REVOKE <role>ROLLBACKSELECTSET DEFAULT ROLESET [NAMES|CHARACTER SET]SET PASSWORDSET ROLESET TRANSACTIONSET [GLOBAL|SESSION] <variable>SHOW ANALYZE STATUSSHOW [BACKUPS|RESTORES]SHOW [GLOBAL|SESSION] BINDINGSSHOW BUILTINSSHOW CHARACTER SETSHOW COLLATIONSHOW [FULL] COLUMNS FROMSHOW CONFIGSHOW CREATE PLACEMENT POLICYSHOW CREATE SEQUENCESHOW CREATE TABLESHOW CREATE USERSHOW DATABASESSHOW DRAINER STATUSSHOW ENGINESSHOW ERRORSSHOW [FULL] FIELDS FROMSHOW GRANTSSHOW INDEX [FROM|IN]SHOW INDEXES [FROM|IN]SHOW KEYS [FROM|IN]SHOW MASTER STATUSSHOW PLACEMENTSHOW PLACEMENT FORSHOW PLACEMENT LABELSSHOW PLUGINSSHOW PRIVILEGESSHOW [FULL] PROCESSSLISTSHOW PROFILESSHOW PUMP STATUSSHOW SCHEMASSHOW STATS_HEALTHYSHOW STATS_HISTOGRAMSSHOW STATS_METASHOW STATUSSHOW TABLE NEXT_ROW_IDSHOW TABLE REGIONSSHOW TABLE STATUSSHOW [FULL] TABLESSHOW [GLOBAL|SESSION] VARIABLESSHOW WARNINGSSHUTDOWNSPLIT REGIONSTART TRANSACTIONTABLETRACETRUNCATEUPDATEUSEWITH
- Data Types
- Functions and Operators
- Overview
- Type Conversion in Expression Evaluation
- Operators
- Control Flow Functions
- String Functions
- Numeric Functions and Operators
- Date and Time Functions
- Bit Functions and Operators
- Cast Functions and Operators
- Encryption and Compression Functions
- Locking Functions
- Information Functions
- JSON Functions
- Aggregate (GROUP BY) Functions
- Window Functions
- Miscellaneous Functions
- Precision Math
- Set Operations
- List of Expressions for Pushdown
- TiDB Specific Functions
- Clustered Indexes
- Constraints
- Generated Columns
- SQL Mode
- Table Attributes
- Transactions
- Garbage Collection (GC)
- Views
- Partitioning
- Temporary Tables
- Cached Tables
- Character Set and Collation
- Placement Rules in SQL
- System Tables
mysql- INFORMATION_SCHEMA
- Overview
ANALYZE_STATUSCLIENT_ERRORS_SUMMARY_BY_HOSTCLIENT_ERRORS_SUMMARY_BY_USERCLIENT_ERRORS_SUMMARY_GLOBALCHARACTER_SETSCLUSTER_CONFIGCLUSTER_HARDWARECLUSTER_INFOCLUSTER_LOADCLUSTER_LOGCLUSTER_SYSTEMINFOCOLLATIONSCOLLATION_CHARACTER_SET_APPLICABILITYCOLUMNSDATA_LOCK_WAITSDDL_JOBSDEADLOCKSENGINESINSPECTION_RESULTINSPECTION_RULESINSPECTION_SUMMARYKEY_COLUMN_USAGEMETRICS_SUMMARYMETRICS_TABLESPARTITIONSPLACEMENT_POLICIESPROCESSLISTREFERENTIAL_CONSTRAINTSSCHEMATASEQUENCESSESSION_VARIABLESSLOW_QUERYSTATISTICSTABLESTABLE_CONSTRAINTSTABLE_STORAGE_STATSTIDB_HOT_REGIONSTIDB_HOT_REGIONS_HISTORYTIDB_INDEXESTIDB_SERVERS_INFOTIDB_TRXTIFLASH_REPLICATIKV_REGION_PEERSTIKV_REGION_STATUSTIKV_STORE_STATUSUSER_PRIVILEGESVIEWS
METRICS_SCHEMA
- UI
- TiDB Dashboard
- Overview
- Maintain
- Access
- Overview Page
- Cluster Info Page
- Top SQL Page
- Key Visualizer Page
- Metrics Relation Graph
- SQL Statements Analysis
- Slow Queries Page
- Cluster Diagnostics
- Search Logs Page
- Instance Profiling
- Session Management and Configuration
- FAQ
- CLI
- Command Line Flags
- Configuration File Parameters
- System Variables
- Storage Engines
- Telemetry
- Errors Codes
- Table Filter
- Schedule Replicas by Topology Labels
- FAQs
- Release Notes
- All Releases
- Release Timeline
- TiDB Versioning
- v6.1
- v6.0
- v5.4
- v5.3
- v5.2
- v5.1
- v5.0
- v4.0
- v3.1
- v3.0
- v2.1
- v2.0
- v1.0
- Glossary
TiDB Features
This document lists the features supported in each TiDB version. Note that supports for experimental features might change before the final release.
Data types, functions, and operators
| Data types, functions, and operators | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
| Numeric types | Y | Y | Y | Y | Y | Y | Y | Y |
| Date and time types | Y | Y | Y | Y | Y | Y | Y | Y |
| String types | Y | Y | Y | Y | Y | Y | Y | Y |
| JSON type | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
| Control flow functions | Y | Y | Y | Y | Y | Y | Y | Y |
| String functions | Y | Y | Y | Y | Y | Y | Y | Y |
| Numeric functions and operators | Y | Y | Y | Y | Y | Y | Y | Y |
| Date and time functions | Y | Y | Y | Y | Y | Y | Y | Y |
| Bit functions and operators | Y | Y | Y | Y | Y | Y | Y | Y |
| Cast functions and operators | Y | Y | Y | Y | Y | Y | Y | Y |
| Encryption and compression functions | Y | Y | Y | Y | Y | Y | Y | Y |
| Information functions | Y | Y | Y | Y | Y | Y | Y | Y |
| JSON functions | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
| Aggregation functions | Y | Y | Y | Y | Y | Y | Y | Y |
| Window functions | Y | Y | Y | Y | Y | Y | Y | Y |
| Miscellaneous functions | Y | Y | Y | Y | Y | Y | Y | Y |
| Operators | Y | Y | Y | Y | Y | Y | Y | Y |
| Character sets and collations 1 | Y | Y | Y | Y | Y | Y | Y | Y |
| User-level lock | Y | N | N | N | N | N | N | N |
Indexing and constraints
| Indexing and constraints | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
| Expression indexes | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
| Columnar storage (TiFlash) | Y | Y | Y | Y | Y | Y | Y | Y |
| RocksDB engine | Y | Y | Y | Y | Y | Y | Y | Y |
| Titan plugin | Y | Y | Y | Y | Y | Y | Y | Y |
| Invisible indexes | Y | Y | Y | Y | Y | Y | Y | N |
Composite PRIMARY KEY | Y | Y | Y | Y | Y | Y | Y | Y |
| Unique indexes | Y | Y | Y | Y | Y | Y | Y | Y |
Clustered index on integer PRIMARY KEY | Y | Y | Y | Y | Y | Y | Y | Y |
| Clustered index on composite or non-integer key | Y | Y | Y | Y | Y | Y | Y | N |
SQL statements
| SQL statements 2 | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
Basic SELECT, INSERT, UPDATE, DELETE, REPLACE | Y | Y | Y | Y | Y | Y | Y | Y |
INSERT ON DUPLICATE KEY UPDATE | Y | Y | Y | Y | Y | Y | Y | Y |
LOAD DATA INFILE | Y | Y | Y | Y | Y | Y | Y | Y |
SELECT INTO OUTFILE | Y | Y | Y | Y | Y | Y | Y | Y |
INNER JOIN, LEFT\|RIGHT [OUTER] JOIN | Y | Y | Y | Y | Y | Y | Y | Y |
UNION, UNION ALL | Y | Y | Y | Y | Y | Y | Y | Y |
EXCEPT and INTERSECT operators | Y | Y | Y | Y | Y | Y | Y | N |
GROUP BY, ORDER BY | Y | Y | Y | Y | Y | Y | Y | Y |
| Window Functions | Y | Y | Y | Y | Y | Y | Y | Y |
| Common Table Expressions (CTE) | Y | Y | Y | Y | Y | Y | N | N |
START TRANSACTION, COMMIT, ROLLBACK | Y | Y | Y | Y | Y | Y | Y | Y |
EXPLAIN | Y | Y | Y | Y | Y | Y | Y | Y |
EXPLAIN ANALYZE | Y | Y | Y | Y | Y | Y | Y | Y |
| User-defined variables | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
BATCH [ON COLUMN] LIMIT INTEGER DELETE | Y | N | N | N | N | N | N | N |
Advanced SQL features
| Advanced SQL features | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
| Prepared statement cache | Y | Y | Y | Y | Experimental | Experimental | Experimental | Experimental |
| SQL plan management (SPM) | Y | Y | Y | Y | Y | Y | Y | Y |
| Coprocessor cache | Y | Y | Y | Y | Y | Y | Y | Experimental |
| Stale Read | Y | Y | Y | Y | Y | Y | N | N |
| Follower reads | Y | Y | Y | Y | Y | Y | Y | Y |
| Read historical data (tidb_snapshot) | Y | Y | Y | Y | Y | Y | Y | Y |
| Optimizer hints | Y | Y | Y | Y | Y | Y | Y | Y |
| MPP Execution Engine | Y | Y | Y | Y | Y | Y | Y | N |
| Index Merge | Y | Y | Y | Experimental | Experimental | Experimental | Experimental | Experimental |
| Placement Rules in SQL | Y | Y | Experimental | Experimental | N | N | N | N |
Data definition language (DDL)
| Data definition language (DDL) | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
Basic CREATE, DROP, ALTER, RENAME, TRUNCATE | Y | Y | Y | Y | Y | Y | Y | Y |
| Generated columns | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
| Views | Y | Y | Y | Y | Y | Y | Y | Y |
| Sequences | Y | Y | Y | Y | Y | Y | Y | Y |
| Auto increment | Y | Y | Y | Y | Y | Y | Y | Y |
| Auto random | Y | Y | Y | Y | Y | Y | Y | Y |
| DDL algorithm assertions | Y | Y | Y | Y | Y | Y | Y | Y |
| Multi-schema change: add columns | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
| Change column type | Y | Y | Y | Y | Y | Y | N | N |
| Temporary tables | Y | Y | Y | Y | N | N | N | N |
Transactions
| Transactions | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
| Async commit | Y | Y | Y | Y | Y | Y | Y | N |
| 1PC | Y | Y | Y | Y | Y | Y | Y | N |
| Large transactions (10GB) | Y | Y | Y | Y | Y | Y | Y | Y |
| Pessimistic transactions | Y | Y | Y | Y | Y | Y | Y | Y |
| Optimistic transactions | Y | Y | Y | Y | Y | Y | Y | Y |
| Repeatable-read isolation (snapshot isolation) | Y | Y | Y | Y | Y | Y | Y | Y |
| Read-committed isolation | Y | Y | Y | Y | Y | Y | Y | Y |
Partitioning
| Partitioning | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
| Range partitioning | Y | Y | Y | Y | Y | Y | Y | Y |
| Hash partitioning | Y | Y | Y | Y | Y | Y | Y | Y |
| List partitioning | Y | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | N |
| List COLUMNS partitioning | Y | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | N |
EXCHANGE PARTITION | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | N |
| Dynamic Pruning | Y | Experimental | Experimental | Experimental | Experimental | Experimental | N | N |
Statistics
| Statistics | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
| CMSketch | Disabled by default | Disabled by default | Disabled by default | Disabled by default | Y | Y | Y | Y |
| Histograms | Y | Y | Y | Y | Y | Y | Y | Y |
| Extended statistics (multiple columns) | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | N |
| Statistics feedback | Deprecated | Deprecated | Deprecated | Experimental | Experimental | Experimental | Experimental | Experimental |
| Automatically update statistics | Y | Y | Y | Y | Y | Y | Y | Y |
| Fast Analyze | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
| Dynamic pruning | Y | Experimental | Experimental | Experimental | Experimental | Experimental | N | N |
Security
| Security | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
| Transparent layer security (TLS) | Y | Y | Y | Y | Y | Y | Y | Y |
| Encryption at rest (TDE) | Y | Y | Y | Y | Y | Y | Y | Y |
| Role-based authentication (RBAC) | Y | Y | Y | Y | Y | Y | Y | Y |
| Certificate-based authentication | Y | Y | Y | Y | Y | Y | Y | Y |
caching_sha2_password authentication | Y | Y | Y | Y | Y | N | N | N |
MySQL compatible GRANT system | Y | Y | Y | Y | Y | Y | Y | Y |
| Dynamic Privileges | Y | Y | Y | Y | Y | Y | N | N |
| Security Enhanced Mode | Y | Y | Y | Y | Y | Y | N | N |
| Redacted Log Files | Y | Y | Y | Y | Y | Y | Y | N |
Data import and export
| Data import and export | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
| Fast Importer (TiDB Lightning) | Y | Y | Y | Y | Y | Y | Y | Y |
| mydumper logical dumper | Deprecated | Deprecated | Deprecated | Deprecated | Deprecated | Deprecated | Deprecated | Deprecated |
| Dumpling logical dumper | Y | Y | Y | Y | Y | Y | Y | Y |
Transactional LOAD DATA | Y | Y | Y | Y | Y | Y | Y | N 3 |
| Database migration toolkit (DM) | Y | Y | Y | Y | Y | Y | Y | Y |
| TiDB Binlog | Y | Y | Y | Y | Y | Y | Y | Y |
| Change data capture (CDC) | Y | Y | Y | Y | Y | Y | Y | Y |
Management, observability, and tools
| Management, observability, and tools | 6.1 | 6.0 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 |
|---|---|---|---|---|---|---|---|---|
| TiDB Dashboard UI | Y | Y | Y | Y | Y | Y | Y | Y |
| TiDB Dashboard Continuous Profiling | Y | Y | Experimental | Experimental | N | N | N | N |
| TiDB Dashboard Top SQL | Y | Y | Experimental | N | N | N | N | N |
| TiDB Dashboard SQL Diagnostics | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
| Information schema | Y | Y | Y | Y | Y | Y | Y | Y |
| Metrics schema | Y | Y | Y | Y | Y | Y | Y | Y |
| Statements summary tables | Y | Y | Y | Y | Y | Y | Y | Y |
| Slow query log | Y | Y | Y | Y | Y | Y | Y | Y |
| TiUP deployment | Y | Y | Y | Y | Y | Y | Y | Y |
| Ansible deployment | N | N | N | N | N | N | N | Deprecated |
| Kubernetes operator | Y | Y | Y | Y | Y | Y | Y | Y |
| Built-in physical backup | Y | Y | Y | Y | Y | Y | Y | Y |
| Global Kill | Y | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
| Lock View | Y | Y | Y | Y | Y | Experimental | Experimental | Experimental |
SHOW CONFIG | Y | Y | Y | Y | Y | Y | Y | Y |
SET CONFIG | Y | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental | Experimental |
| DM WebUI | Experimental | Experimental | N | N | N | N | N | N |
- TiDB incorrectly treats latin1 as a subset of utf8. See TiDB #18955 for more details.↩
- See Statement Reference for a full list of SQL statements supported.↩
- For TiDB v4.0, the
LOAD DATAtransaction does not guarantee atomicity.↩
Was this page helpful?