diff --git a/TOC.md b/TOC.md index a0b145e212235..12b10328cffeb 100644 --- a/TOC.md +++ b/TOC.md @@ -5,176 +5,196 @@ ## Documentation List -+ Introduction - - [TiDB Introduction](/overview.md) - - [What's New in TiDB 4.0](/whats-new-in-tidb-4.0.md) ++ About TiDB + + [TiDB Introduction](/overview.md) + + [What's New in TiDB 4.0](/whats-new-in-tidb-4.0.md) + + [Key Features](/key-features.md) + + Compatibility + + [MySQL Compatibility](/mysql-compatibility.md) ++ Quick Start + + [Try Out TiDB](/quick-start-with-tidb.md) + + [Learn TiDB SQL](/basic-sql-operations.md) ++ Deploy + + [Software and Hardware Requirements](/hardware-and-software-requirements.md) + + [Environment Configuration Checklist](/check-before-deployment.md) + + Topology Patterns + + [Minimal Topology](/minimal-deployment-topology.md) + + [TiFlash Topology](/tiflash-deployment-topology.md) + + [TiCDC Topology](/ticdc-deployment-topology.md) + + [TiDB Binlog Topology](/tidb-binlog-deployment-topology.md) + + [Cross-DC Topology](/geo-distributed-deployment-topology.md) + + [Hybrid Topology](/hybrid-deployment-topology.md) + + Install and Start + + Linux OS + + [Use TiUP (Recommended)](/production-deployment-using-tiup.md) + + [Use TiUP Offline (Recommended)](/production-offline-deployment-using-tiup.md) + + [Use TiDB Ansible](/online-deployment-using-ansible.md) + + [Use TiDB Ansible Offline](/offline-deployment-using-ansible.md) + + [Verify Cluster Status](/post-installation-check.md) + Benchmarks - - [How to Test TiDB Using Sysbench](/benchmark/benchmark-tidb-using-sysbench.md) - - [How to Run TPC-C Test on TiDB](/benchmark/benchmark-tidb-using-tpcc.md) - + [Sysbench Performance Test - v4.0 vs. v3.0](/benchmark/benchmark-sysbench-v4-vs-v3.md) - + [TPC-H Performance Test - v4.0 vs. v3.0](/benchmark/v4.0-performance-benchmarking-with-tpch.md) - + [TPC-C Performance Test - v4.0 vs. v3.0](/benchmark/v4.0-performance-benchmarking-with-tpcc.md) - - [Sysbench Performance Test - v3.0 vs. v2.1](/benchmark/v3.0-performance-benchmarking-with-sysbench.md) - - [TPC-C Performance Test - v3.0 vs. v2.1](/benchmark/v3.0-performance-benchmarking-with-tpcc.md) - - [Interaction Test on Online Workloads and `ADD INDEX` Operations](/benchmark/online-workloads-and-add-index-operations.md) -- [Quick Start with TiDB](/quick-start-with-tidb.md) -+ Concepts - - [Architecture](/architecture.md) - + Key Features - - [Horizontal Scalability](/key-features.md#horizontal-scalability) - - [MySQL Compatible Syntax](/key-features.md#mysql-compatible-syntax) - - [Replicate from and to MySQL](/key-features.md#replicate-from-and-to-mysql) - - [Distributed Transactions with Strong Consistency](/key-features.md#distributed-transactions-with-strong-consistency) - - [Cloud Native Architecture](/key-features.md#cloud-native-architecture) - - [Minimize ETL with HTAP](/key-features.md#minimize-etl-with-htap) - - [Fault Tolerance & Recovery with Raft](/key-features.md#fault-tolerance--recovery-with-raft) - - [Automatic Rebalancing](/key-features.md#automatic-rebalancing) - - [Deployment and Orchestration with Ansible, Kubernetes, Docker](/key-features.md#deployment-and-orchestration-with-ansible-kubernetes-docker) - - [JSON Support](/key-features.md#json-support) - - [Spark Integration](/key-features.md#spark-integration) - - [Read Historical Data Without Restoring from Backup](/key-features.md#read-historical-data-without-restoring-from-backup) - - [Fast Import and Restore of Data](/key-features.md#fast-import-and-restore-of-data) - - [Hybrid of Column and Row Storage](/key-features.md#hybrid-of-column-and-row-storage) - - [SQL Plan Management](/key-features.md#sql-plan-management) - - [Open Source](/key-features.md#open-source) - - [Online Schema Changes](/key-features.md#online-schema-changes) -+ How-to - + Get Started - + Start a Cluster - - [From Binary](/deploy-tidb-from-binary.md) - - [From Homebrew](/deploy-tidb-from-homebrew.md) - - [From DBdeployer](/deploy-tidb-from-dbdeployer.md) - - [From Docker Compose](/deploy-test-cluster-using-docker-compose.md) - - [Explore SQL with TiDB](/basic-sql-operations.md) - - [Import Example Database](/import-example-data.md) - - [Read Historical Data](/read-historical-data.md) - - [TiDB Binlog Tutorial](/get-started-with-tidb-binlog.md) - - [TiDB Data Migration Tutorial](https://pingcap.com/docs/tidb-data-migration/stable/get-started/) - - [TiDB Lightning Tutorial](/get-started-with-tidb-lightning.md) - - [TiSpark Quick Start Guide](/get-started-with-tispark.md) - + Deploy - - [Software and Hardware Requirements](/hardware-and-software-requirements.md) - + From Binary Tarball - - [For Testing Environments](/test-deployment-from-binary-tarball.md) - - [For Production Environments](/production-deployment-from-binary-tarball.md) - + Orchestrated Deployment - - [Use TiUP (Recommended)](/production-deployment-using-tiup.md) - - [Use TiUP Offline (Recommended)](/production-offline-deployment-using-tiup.md) - - [Use TiDB Ansible](/online-deployment-using-ansible.md) - - [Use TiDB Ansible Offline](/offline-deployment-using-ansible.md) - - [Use Docker](/test-deployment-using-docker.md) - + [Check Cluster Status](/post-installation-check.md) - + Geographic Redundancy - - [Overview](/geo-redundancy-deployment.md) - - [Configure Location Awareness](/location-awareness.md) - - [Data Migration with Ansible](https://pingcap.com/docs/tidb-data-migration/stable/deploy-a-dm-cluster-using-ansible/) - + Configure - - [Time Zone](/configure-time-zone.md) - - [Memory Control](/configure-memory-usage.md) - - [Placement Rules](/configure-placement-rules.md) - + Secure - + Transport Layer Security (TLS) - - [Enable TLS for MySQL Clients and Servers](/enable-tls-between-clients-and-servers.md) - - [Enable TLS Between TiDB Components](/enable-tls-between-components.md) - - [Encrypt Stored Data](/enable-encrypt-stored-data.md) - - [Generate Self-signed Certificates](/generate-self-signed-certificates.md) - - [Encryption-At-Rest](/encryption-at-rest.md) - + Monitor - - [Overview](/tidb-monitoring-framework.md) - - [Monitor a TiDB Cluster](/monitor-a-tidb-cluster.md) - + Migrate - - [Migration Tools User Guide](/ecosystem-tool-user-guide.md) - + Migrate from MySQL - - [Migration Case of Amazon Aurora](/migrate-from-aurora-mysql-database.md) - - [Migrate from CSV](/tidb-lightning/migrate-from-csv-using-tidb-lightning.md) - + Maintain - - [Common TiUP Operations](/maintain-tidb-using-tiup.md) - - [Common Ansible Operations](/maintain-tidb-using-ansible.md) - + Backup and Restore - - [Use Mydumper and TiDB Lightning](/backup-and-restore-using-mydumper-lightning.md) - - [Use Dumpling for Export or Backup](/export-or-backup-using-dumpling.md) - + Use BR - - [Use BR](/br/backup-and-restore-tool.md) - - [BR Use Cases](/br/backup-and-restore-use-cases.md) - + Identify Abnormal Queries - - [Identify Slow Queries](/identify-slow-queries.md) - - [Identify Expensive Queries](/identify-expensive-queries.md) - + Scale - - [Scale using Ansible](/scale-tidb-using-ansible.md) - - [Scale using TiUP](/scale-tidb-using-tiup.md) + + [Test TiDB Using Sysbench](/benchmark/benchmark-tidb-using-sysbench.md) + + [Run TPC-C Test on TiDB](/benchmark/benchmark-tidb-using-tpcc.md) + + [v4.0 Sysbench Performance Test](/benchmark/benchmark-sysbench-v4-vs-v3.md) + + [v4.0 TPC-H Performance Test](/benchmark/v4.0-performance-benchmarking-with-tpch.md) + + [v4.0 TPC-C Performance Test](/benchmark/v4.0-performance-benchmarking-with-tpcc.md) + + [v3.0 Sysbench Performance Test](/benchmark/v3.0-performance-benchmarking-with-sysbench.md) + + [v3.0 TPC-C Performance Test](/benchmark/v3.0-performance-benchmarking-with-tpcc.md) + + [Interaction Test on Online Workloads and `ADD INDEX`](/benchmark/online-workloads-and-add-index-operations.md) ++ Migrate + + [Migration Tools Guide](/ecosystem-tool-user-guide.md) + + Migrate from MySQL + + [Migrate from Amazon Aurora MySQL Using DM](/migrate-from-aurora-mysql-database.md) + + Migrate from CSV Files + + [Use TiDB Lightning](/tidb-lightning/migrate-from-csv-using-tidb-lightning.md) + + [Use `LOAD DATA` Statement](/sql-statements/sql-statement-load-data.md) ++ Maintain + Upgrade - - [Upgrade Using TiUP (Recommended)](/upgrade-tidb-using-tiup.md) - - [Upgrade Using TiDB Ansible](/upgrade-tidb-using-ansible.md) - - Troubleshoot - - [TiDB Troubleshooting Map](/tidb-troubleshooting-map.md) - - [Troubleshoot Cluster Setup](/troubleshoot-tidb-cluster.md) - - [Troubleshoot TiDB Lightning](/troubleshoot-tidb-lightning.md) + + [Use TiUP (Recommended)](/upgrade-tidb-using-tiup.md) + + [Use TiDB Operator](https://pingcap.com/docs/tidb-in-kubernetes/stable/upgrade-a-tidb-cluster/) + + [Use TiDB Ansible](/upgrade-tidb-using-ansible.md) + + Scale + + [Use TiUP (Recommended)](/scale-tidb-using-tiup.md) + + [Use TiDB Ansible](/scale-tidb-using-ansible.md) + + [Use TiDB Operator](https://pingcap.com/docs/tidb-in-kubernetes/stable/scale-a-tidb-cluster/) + + Backup and Restore + + [Use Mydumper and TiDB Lightning](/backup-and-restore-using-mydumper-lightning.md) + + [Use Dumpling for Export or Backup](/export-or-backup-using-dumpling.md) + + Use BR Tool + + [Use BR Tool](/br/backup-and-restore-tool.md) + + [BR Use Cases](/br/backup-and-restore-use-cases.md) + + [BR storages](/br/backup-and-restore-storages.md) + + [Daily Checklist](/daily-check.md) + + [Maintain TiCDC](/ticdc/manage-ticdc.md) + + [Maintain TiFlash](/tiflash/maintain-tiflash.md) + + [Maintain TiDB Using TiUP](/maintain-tidb-using-tiup.md) + + [Maintain TiDB Using Ansible](/maintain-tidb-using-ansible.md) ++ Monitor and Alert + + [Monitoring Framework](/tidb-monitoring-framework.md) + + [Monitor a TiDB Cluster](/monitor-a-tidb-cluster.md) + + [TiDB Cluster Alert Rules](/alert-rules.md) + + [TiFlash Alert Rules](/tiflash/tiflash-alert-rules.md) ++ Troubleshoot + + [Identify Slow Queries](/identify-slow-queries.md) + + [Identify Expensive Queries](/identify-expensive-queries.md) + + [Statement Summary Tables](/statement-summary-tables.md) + + [Troubleshoot Cluster Setup](/troubleshoot-tidb-cluster.md) + + [TiDB Troubleshooting Map](/tidb-troubleshooting-map.md) + + [Troubleshoot TiFlash](/tiflash/troubleshoot-tiflash.md) ++ Performance Tuning + + Software Tuning + + Configuration + + [TiKV Tuning](/tune-tikv-performance.md) + + [TiKV Follower Read](/follower-read.md) + + [TiFlash Tuning](/tiflash/tune-tiflash-performance.md) + + [Coprocessor Cache](/coprocessor-cache.md) + + SQL Tuning + + [SQL Tuning with `EXPLAIN`](/query-execution-plan.md) + + SQL Optimization + + [SQL Optimization Process](/sql-optimization-concepts.md) + + Logic Optimization + + [Join Reorder](/join-reorder.md) + + Physical Optimization + + [Statistics](/statistics.md) + + Control Execution Plan + + [Optimizer Hints](/optimizer-hints.md) + + [SQL Plan Management](/sql-plan-management.md) + + [Access Tables Using `IndexMerge`](/index-merge.md) ++ Tutorials + + [Geo-Redundant Deployment](/geo-redundancy-deployment.md) + + Best Practices + + [Java Application Development](/best-practices/java-app-best-practices.md) + + [Use HAProxy](/best-practices/haproxy-best-practices.md) + + [Highly Concurrent Write](/best-practices/high-concurrency-best-practices.md) + + [Grafana Monitoring](/best-practices/grafana-monitor-best-practices.md) + + [PD Scheduling](/best-practices/pd-scheduling-best-practices.md) + + [TiKV Performance Tuning with Massive Regions](/best-practices/massive-regions-best-practices.md) + + [Use Placement Rules](/configure-placement-rules.md) ++ TiDB Ecosystem Tools + + [Tools Guide](/ecosystem-tool-user-guide.md) + + [Download](/download-ecosystem-tools.md) + + Backup & Restore (BR) + + [BR FAQ](/br/backup-and-restore-faq.md) + + [Use BR Tool](/br/backup-and-restore-tool.md) + + [BR Use Cases](/br/backup-and-restore-use-cases.md) + + TiDB Binlog + + [Overview](/tidb-binlog/tidb-binlog-overview.md) + + [Deploy](/tidb-binlog/deploy-tidb-binlog.md) + + [Maintain](/tidb-binlog/maintain-tidb-binlog-cluster.md) + + [Configure](/tidb-binlog/tidb-binlog-configuration-file.md) + + [Pump](/tidb-binlog/tidb-binlog-configuration-file.md#pump) + + [Drainer](/tidb-binlog/tidb-binlog-configuration-file.md#drainer) + + [Upgrade](/tidb-binlog/upgrade-tidb-binlog.md) + + [Monitor](/tidb-binlog/monitor-tidb-binlog-cluster.md) + + [Reparo](/tidb-binlog/tidb-binlog-reparo.md) + + [Binlog Slave Client](/tidb-binlog/binlog-slave-client.md) + + [TiDB Binlog Relay Log](/tidb-binlog/tidb-binlog-relay-log.md) + + [Bidirectional Replication Between TiDB Clusters](/tidb-binlog/bidirectional-replication-between-tidb-clusters.md) + + [Glossary](/tidb-binlog/tidb-binlog-glossary.md) + + Troubleshoot + + [Troubleshoot](/tidb-binlog/troubleshoot-tidb-binlog.md) + + [Handle Errors](/tidb-binlog/handle-tidb-binlog-errors.md) + + [FAQ](/tidb-binlog/tidb-binlog-faq.md) + + TiDB Lightning + + [Overview](/tidb-lightning/tidb-lightning-overview.md) + + [Tutorial](/get-started-with-tidb-lightning.md) + + [Deploy](/tidb-lightning/deploy-tidb-lightning.md) + + [Configure](/tidb-lightning/tidb-lightning-configuration.md) + + Key Features + + [Checkpoints](/tidb-lightning/tidb-lightning-checkpoints.md) + + [Table Filter](/tidb-lightning/tidb-lightning-table-filter.md) + + [CSV Support](/tidb-lightning/migrate-from-csv-using-tidb-lightning.md) + + [TiDB-backend](/tidb-lightning/tidb-lightning-tidb-backend.md) + + [Web Interface](/tidb-lightning/tidb-lightning-web-interface.md) + + [Monitor](/tidb-lightning/monitor-tidb-lightning.md) + + [Troubleshoot](/troubleshoot-tidb-lightning.md) + + [FAQ](/tidb-lightning/tidb-lightning-faq.md) + + [Glossary](/tidb-lightning/tidb-lightning-glossary.md) + + TiCDC + - [Overview](/ticdc/ticdc-overview.md) + - [Configure Sink URI](/ticdc/sink-url.md) + - [TiCDC Open Protocol](/ticdc/ticdc-open-protocol.md) + - [Column and DDL Type Codes](/ticdc/column-ddl-type-codes.md) + + sync-diff-inspector + + [Overview](/sync-diff-inspector/sync-diff-inspector-overview.md) + + [Data Check for Tables with Different Schema/Table Names](/sync-diff-inspector/route-diff.md) + + [Data Check in Sharding Scenarios](/sync-diff-inspector/shard-diff.md) + + [Data Check for TiDB Upstream/Downstream Clusters](/sync-diff-inspector/upstream-downstream-diff.md) + + [Loader](/loader-overview.md) + + [Mydumper](/mydumper-overview.md) + + [Syncer](/syncer-overview.md) + + TiSpark + + [Quick Start](/get-started-with-tispark.md) + + [User Guide](/tispark-overview.md) + Reference + + [Architecture](/architecture.md) + + Key Monitoring Metrics + + [Overview](/grafana-overview-dashboard.md) + + [TiDB](/grafana-tidb-dashboard.md) + + [PD](/grafana-pd-dashboard.md) + + [TiKV](/grafana-tikv-dashboard.md) + + [TiFlash](/tiflash/monitor-tiflash.md) + + Secure + + [Enable TLS Between TiDB Clients and Servers](/enable-tls-between-clients-and-servers.md) + + [Enable TLS Between TiDB Components](/enable-tls-between-components.md) + + [Encrypt Stored Data](/enable-encrypt-stored-data.md) + + [Generate Self-signed Certificates](/generate-self-signed-certificates.md) + + [Encryption-At-Rest](/encryption-at-rest.md) + + Privileges + + [Security Compatibility with MySQL](/security-compatibility-with-mysql.md) + + [Privilege Management](/privilege-management.md) + + [User Account Management](/user-account-management.md) + + [Role-Based Access Control](/role-based-access-control.md) + + [Certificate-Based Authentication](/certificate-authentication.md) + SQL - - [MySQL Compatibility](/mysql-compatibility.md) - + SQL Language Structure - - [Literal Values](/literal-values.md) - - [Schema Object Names](/schema-object-names.md) - - [Keywords and Reserved Words](/keywords-and-reserved-words.md) - - [User-Defined Variables](/user-defined-variables.md) - - [Expression Syntax](/expression-syntax.md) - - [Comment Syntax](/comment-syntax.md) - + Attributes - - [`AUTO_RANDOM`](/auto-random.md) - + Data Types - - [Overview](/data-type-overview.md) - - [Default Values](/data-type-default-values.md) - + Numeric Types - - [`BIT`](/data-type-numeric.md#bit-type) - - [`BOOL|BOOLEAN`](/data-type-numeric.md#boolean-type) - - [`TINYINT`](/data-type-numeric.md#tinyint-type) - - [`SMALLINT`](/data-type-numeric.md#smallint-type) - - [`MEDIUMINT`](/data-type-numeric.md#mediumint-type) - - [`INT|INTEGER`](/data-type-numeric.md#integer-type) - - [`BIGINT`](/data-type-numeric.md#bigint-type) - - [`FLOAT`](/data-type-numeric.md#float-type) - - [`DOUBLE`](/data-type-numeric.md#double-type) - - [`DECIMAL`](/data-type-numeric.md#decimal-type) - + Date and Time Types - - [`DATE`](/data-type-date-and-time.md#date-type) - - [`TIME`](/data-type-date-and-time.md#time-type) - - [`DATETIME`](/data-type-date-and-time.md#datetime-type) - - [`TIMESTAMP`](/data-type-date-and-time.md#timestamp-type) - - [`YEAR`](/data-type-date-and-time.md#year-type) - + String Types - - [`CHAR`](/data-type-string.md#char-type) - - [`VARCHAR`](/data-type-string.md#varchar-type) - - [`TEXT`](/data-type-string.md#text-type) - - [`TINYTEXT`](/data-type-string.md#tinytext-type) - - [`MEDIUMTEXT`](/data-type-string.md#text-type) - - [`LONGTEXT`](/data-type-string.md#longtext-type) - - [`BINARY`](/data-type-string.md#binary-type) - - [`VARBINARY`](/data-type-string.md#varbinary-type) - - [`BLOB`](/data-type-string.md#blob-type) - - [`TINYBLOB`](/data-type-string.md#tinyblob-type) - - [`MEDIUMBLOB`](/data-type-string.md#mediumblob-type) - - [`LONGBLOB`](/data-type-string.md#longblob-type) - - [`ENUM`](/data-type-string.md#enum-type) - - [`SET`](/data-type-string.md#set-type) - - [JSON Type](/data-type-json.md) - + Functions and Operators - - [Function and Operator Reference](/functions-and-operators/functions-and-operators-overview.md) - - [Type Conversion in Expression Evaluation](/functions-and-operators/type-conversion-in-expression-evaluation.md) - - [Operators](/functions-and-operators/operators.md) - - [Control Flow Functions](/functions-and-operators/control-flow-functions.md) - - [String Functions](/functions-and-operators/string-functions.md) - - [Numeric Functions and Operators](/functions-and-operators/numeric-functions-and-operators.md) - - [Date and Time Functions](/functions-and-operators/date-and-time-functions.md) - - [Bit Functions and Operators](/functions-and-operators/bit-functions-and-operators.md) - - [Cast Functions and Operators](/functions-and-operators/cast-functions-and-operators.md) - - [Encryption and Compression Functions](/functions-and-operators/encryption-and-compression-functions.md) - - [Information Functions](/functions-and-operators/information-functions.md) - - [JSON Functions](/functions-and-operators/json-functions.md) - - [Aggregate (GROUP BY) Functions](/functions-and-operators/aggregate-group-by-functions.md) - - [Window Functions](/functions-and-operators/window-functions.md) - - [Miscellaneous Functions](/functions-and-operators/miscellaneous-functions.md) - - [Precision Math](/functions-and-operators/precision-math.md) - - [List of Expressions for Pushdown](/functions-and-operators/expressions-pushed-down.md) + + SQL Language Structure and Syntax + + Attributes + + [AUTO_RANDOM](/auto-random.md) + + [Literal Values](/literal-values.md) + + [Schema Object Names](/schema-object-names.md) + + [Keywords and Reserved Words](/keywords-and-reserved-words.md) + + [User-Defined Variables](/user-defined-variables.md) + + [Expression Syntax](/expression-syntax.md) + + [Comment Syntax](/comment-syntax.md) + SQL Statements - [`ADD COLUMN`](/sql-statements/sql-statement-add-column.md) - [`ADD INDEX`](/sql-statements/sql-statement-add-index.md) @@ -186,6 +206,7 @@ - [`ANALYZE TABLE`](/sql-statements/sql-statement-analyze-table.md) - [`BACKUP`](/sql-statements/sql-statement-backup.md) - [`BEGIN`](/sql-statements/sql-statement-begin.md) + - [`CHANGE COLUMN`](/sql-statements/sql-statement-change-column.md) - [`COMMIT`](/sql-statements/sql-statement-commit.md) - [`CREATE DATABASE`](/sql-statements/sql-statement-create-database.md) - [`CREATE INDEX`](/sql-statements/sql-statement-create-index.md) @@ -243,15 +264,16 @@ - [`SHOW ERRORS`](/sql-statements/sql-statement-show-errors.md) - [`SHOW [FULL] FIELDS FROM`](/sql-statements/sql-statement-show-fields-from.md) - [`SHOW GRANTS`](/sql-statements/sql-statement-show-grants.md) - - [`SHOW INDEXES [FROM|IN]`](/sql-statements/sql-statement-show-indexes.md) - [`SHOW INDEX [FROM|IN]`](/sql-statements/sql-statement-show-index.md) + - [`SHOW INDEXES [FROM|IN]`](/sql-statements/sql-statement-show-indexes.md) - [`SHOW KEYS [FROM|IN]`](/sql-statements/sql-statement-show-keys.md) - [`SHOW PRIVILEGES`](/sql-statements/sql-statement-show-privileges.md) - [`SHOW [FULL] PROCESSSLIST`](/sql-statements/sql-statement-show-processlist.md) - [`SHOW SCHEMAS`](/sql-statements/sql-statement-show-schemas.md) - - [`SHOW [FULL] TABLES`](/sql-statements/sql-statement-show-tables.md) + - [`SHOW STATUS`](/sql-statements/sql-statement-show-status.md) - [`SHOW TABLE REGIONS`](/sql-statements/sql-statement-show-table-regions.md) - [`SHOW TABLE STATUS`](/sql-statements/sql-statement-show-table-status.md) + - [`SHOW [FULL] TABLES`](/sql-statements/sql-statement-show-tables.md) - [`SHOW [GLOBAL|SESSION] VARIABLES`](/sql-statements/sql-statement-show-variables.md) - [`SHOW WARNINGS`](/sql-statements/sql-statement-show-warnings.md) - [`SPLIT REGION`](/sql-statements/sql-statement-split-region.md) @@ -260,176 +282,120 @@ - [`TRUNCATE`](/sql-statements/sql-statement-truncate.md) - [`UPDATE`](/sql-statements/sql-statement-update.md) - [`USE`](/sql-statements/sql-statement-use.md) - - [Constraints](/constraints.md) - - [Generated Columns](/generated-columns.md) - - [Partitioning](/partitioned-table.md) - - [Character Set and Collation](/character-set-and-collation.md) - - [SQL Mode](/sql-mode.md) - - [SQL Diagnosis](/system-tables/system-table-sql-diagnosis.md) - - [Views](/views.md) - + Configuration - + tidb-server - - [MySQL System Variables](/system-variables.md) - - [TiDB Specific System Variables](/tidb-specific-system-variables.md) - - [Configuration Flags](/command-line-flags-for-tidb-configuration.md) - - [Configuration File](/tidb-configuration-file.md) - + pd-server - - [Configuration Flags](/command-line-flags-for-pd-configuration.md) - - [Configuration File](/pd-configuration-file.md) - + tikv-server - - [Configuration Flags](/command-line-flags-for-tikv-configuration.md) - - [Configuration File](/tikv-configuration-file.md) - + Security - - [Security Compatibility with MySQL](/security-compatibility-with-mysql.md) - - [The TiDB Access Privilege System](/privilege-management.md) - - [TiDB User Account Management](/user-account-management.md) - - [Role-Based Access Control](/role-based-access-control.md) - - [Certificate-Based Authentication](/certificate-authentication.md) - + Transactions - - [Overview](/transaction-overview.md) - - [Isolation Levels](/transaction-isolation-levels.md) - - [Optimistic Transactions](/optimistic-transaction.md) - - [Pessimistic Transactions](/pessimistic-transaction.md) - + System Databases - - [`mysql`](/system-tables/system-table-overview.md) - - [`information_schema`](/system-tables/system-table-information-schema.md) - + `sql-diagnosis` - - [`cluster_info`](/system-tables/system-table-cluster-info.md) - - [`cluster_hardware`](/system-tables/system-table-cluster-hardware.md) - - [`cluster_config`](/system-tables/system-table-cluster-config.md) - - [`cluster_load`](/system-tables/system-table-cluster-load.md) - - [`cluster_systeminfo`](/system-tables/system-table-cluster-systeminfo.md) - - [`cluster_log`](/system-tables/system-table-cluster-log.md) - - [`metrics_schema`](/system-tables/system-table-metrics-schema.md) - - [`metrics_tables`](/system-tables/system-table-metrics-tables.md) - - [`metrics_summary`](/system-tables/system-table-metrics-summary.md) - - [`inspection_result`](/system-tables/system-table-inspection-result.md) - - [`inspection_summary`](/system-tables/system-table-inspection-summary.md) - - [Errors Codes](/error-codes.md) - - [Supported Client Drivers](/connectors-and-apis.md) - + Garbage Collection (GC) - - [GC Overview](/garbage-collection-overview.md) - - [GC Configuration](/garbage-collection-configuration.md) - + Performance - - [Overview](/sql-optimization-concepts.md) - - [Understanding the Query Execution Plan](/query-execution-plan.md) - - [Introduction to Join Reorder](/join-reorder.md) - - [Introduction to Statistics](/statistics.md) - - [Optimizer Hints](/optimizer-hints.md) - - [Follower Read](/follower-read.md) - - [Check the TiDB Cluster Status Using SQL Statements](/check-cluster-status-using-sql-statements.md) - - [SQL Plan Management](/sql-plan-management.md) - - [Access Tables Using `IndexMerge`](/index-merge.md) - - [Statement Summary Table](/statement-summary-tables.md) - - [Coprocessor Cache](/coprocessor-cache.md) - - [Tune TiKV](/tune-tikv-performance.md) - + Key Monitoring Metrics - - [Overview](/grafana-overview-dashboard.md) - - [TiDB](/grafana-tidb-dashboard.md) - - [PD](/grafana-pd-dashboard.md) - - [TiKV](/grafana-tikv-dashboard.md) - - [Alert Rules](/alert-rules.md) - + Best Practices - - [Highly Concurrent Write Best Practices](/best-practices/high-concurrency-best-practices.md) - - [HAProxy Best Practices](/best-practices/haproxy-best-practices.md) - - [Java Application Development Best Practices](/best-practices/java-app-best-practices.md) - - [PD Scheduling Best Practices](/best-practices/pd-scheduling-best-practices.md) - - [Grafana Best Practices](/best-practices/grafana-monitor-best-practices.md) - - [TiKV Performance Tuning with Massive Regions](/best-practices/massive-regions-best-practices.md) - - [TiSpark](/tispark-overview.md) - + TiFlash - - [Overview](/tiflash/tiflash-overview.md) - - [Deploy a TiFlash Cluster](/tiflash/deploy-tiflash.md) - - [Use TiFlash](/tiflash/use-tiflash.md) - - [Maintain a TiFlash Cluster](/tiflash/maintain-tiflash.md) - - [Monitor TiFlash](/tiflash/monitor-tiflash.md) - - [Scale TiFlash](/scale-tidb-using-tiup.md#scale-out-a-tiflash-node) - - [Configure TiFlash](/tiflash/tiflash-configuration.md) - - [TiFlash Alert Rules](/tiflash/tiflash-alert-rules.md) - - [Tune TiFlash Performance](/tiflash/tune-tiflash-performance.md) - - [Troubleshoot a TiFlash Cluster](/tiflash/troubleshoot-tiflash.md) - - [FAQ](/tiflash/tiflash-faq.md) - + TiDB Binlog - - [Overview](/tidb-binlog/tidb-binlog-overview.md) - - [Deploy](/tidb-binlog/deploy-tidb-binlog.md) - - [Maintain](/tidb-binlog/maintain-tidb-binlog-cluster.md) - - [Monitor](/tidb-binlog/monitor-tidb-binlog-cluster.md) - + [Configure](/tidb-binlog/tidb-binlog-configuration-file.md) - - [Pump](/tidb-binlog/tidb-binlog-configuration-file.md#pump) - - [Drainer](/tidb-binlog/tidb-binlog-configuration-file.md#drainer) - - [Upgrade](/tidb-binlog/upgrade-tidb-binlog.md) - - [Reparo](/tidb-binlog/tidb-binlog-reparo.md) - - [Binlog Slave Client](/tidb-binlog/binlog-slave-client.md) - - [TiDB Binlog Relay Log](/tidb-binlog/tidb-binlog-relay-log.md) - - [Bidirectional Replication Between TiDB Clusters](/tidb-binlog/bidirectional-replication-between-tidb-clusters.md) - - [Glossary](/tidb-binlog/tidb-binlog-glossary.md) - + Troubleshoot - - [Troubleshooting](/tidb-binlog/troubleshoot-tidb-binlog.md) - - [Error Handling](/tidb-binlog/handle-tidb-binlog-errors.md) - - [FAQ](/tidb-binlog/tidb-binlog-faq.md) - + Tools - - [Tools User Guide](/ecosystem-tool-user-guide.md) - - [Download](/download-ecosystem-tools.md) - + Backup & Restore (BR) - - [Use BR](/br/backup-and-restore-tool.md) - - [BR Use Cases](/br/backup-and-restore-use-cases.md) - - [BR storages](/br/backup-and-restore-storages.md) - - [BR FAQ](/br/backup-and-restore-faq.md) - - [Mydumper](/mydumper-overview.md) - - [Syncer](/syncer-overview.md) - - [Loader](/loader-overview.md) - - [Data Migration](https://pingcap.com/docs/tidb-data-migration/stable/) - + TiDB Lightning - - [Overview](/tidb-lightning/tidb-lightning-overview.md) - - [Deployment](/tidb-lightning/deploy-tidb-lightning.md) - - [Configuration](/tidb-lightning/tidb-lightning-configuration.md) - - [Checkpoints](/tidb-lightning/tidb-lightning-checkpoints.md) - - [Table Filter](/tidb-lightning/tidb-lightning-table-filter.md) - - [CSV Support](/tidb-lightning/migrate-from-csv-using-tidb-lightning.md) - - [TiDB-backend](/tidb-lightning/tidb-lightning-tidb-backend.md) - - [Web Interface](/tidb-lightning/tidb-lightning-web-interface.md) - - [Monitor](/tidb-lightning/monitor-tidb-lightning.md) - - [Troubleshoot](/troubleshoot-tidb-lightning.md) - - [FAQ](/tidb-lightning/tidb-lightning-faq.md) - - [Glossary](/tidb-lightning/tidb-lightning-glossary.md) - + TiCDC - - [Overview](/ticdc/ticdc-overview.md) - - [Deploy and Use TiCDC](/ticdc/deploy-ticdc.md) - - [Manage TiCDC Cluster and Replication Tasks](/ticdc/manage-ticdc.md) - - [Configure Sink URI](/ticdc/sink-url.md) - - [TiCDC Open Protocol](/ticdc/ticdc-open-protocol.md) - - [Column and DDL Type Codes](/ticdc/column-ddl-type-codes.md) - + sync-diff-inspector - - [Overview](/sync-diff-inspector/sync-diff-inspector-overview.md) - - [Data Check for Tables with Different Schema or Table Names](/sync-diff-inspector/route-diff.md) - - [Data Check in the Sharding Scenario](/sync-diff-inspector/shard-diff.md) - - [Data Check for TiDB Upstream and Downstream Clusters](/sync-diff-inspector/upstream-downstream-diff.md) - + TiUP - - [TiUP Overview](/tiup/tiup-overview.md) - - [Manage Components with Commands](/tiup/manage-tiup-component.md) - - [Quickly Deploy a Local TiDB Cluster](/tiup/tiup-playground.md) - - [Deploy and Maintain an Online TiDB Cluster](/tiup/tiup-cluster.md) - - [Create a Private Mirror](/tiup/tiup-mirrors.md) - - [Package a Component](/tiup/package-tiup-component.md) - - [Stress Test TiDB Using TiUP](/tiup/tiup-bench.md) - - [PD Control](/pd-control.md) - - [PD Recover](/pd-recover.md) - - [TiKV Control](/tikv-control.md) - - [TiDB Control](/tidb-control.md) -- [TiDB in Kubernetes](https://pingcap.com/docs/tidb-in-kubernetes/stable/) + + Data Types + + [Overview](/data-type-overview.md) + + [Default Values](/data-type-default-values.md) + + [Numeric Types](/data-type-numeric.md) + + [Date and Time Types](/data-type-date-and-time.md) + + [String Types](/data-type-string.md) + + [JSON Type](/data-type-json.md) + + Functions and Operators + + [Overview](/functions-and-operators/functions-and-operators-overview.md) + + [Type Conversion in Expression Evaluation](/functions-and-operators/type-conversion-in-expression-evaluation.md) + + [Operators](/functions-and-operators/operators.md) + + [Control Flow Functions](/functions-and-operators/control-flow-functions.md) + + [String Functions](/functions-and-operators/string-functions.md) + + [Numeric Functions and Operators](/functions-and-operators/numeric-functions-and-operators.md) + + [Date and Time Functions](/functions-and-operators/date-and-time-functions.md) + + [Bit Functions and Operators](/functions-and-operators/bit-functions-and-operators.md) + + [Cast Functions and Operators](/functions-and-operators/cast-functions-and-operators.md) + + [Encryption and Compression Functions](/functions-and-operators/encryption-and-compression-functions.md) + + [Information Functions](/functions-and-operators/information-functions.md) + + [JSON Functions](/functions-and-operators/json-functions.md) + + [Aggregate (GROUP BY) Functions](/functions-and-operators/aggregate-group-by-functions.md) + + [Window Functions](/functions-and-operators/window-functions.md) + + [Miscellaneous Functions](/functions-and-operators/miscellaneous-functions.md) + + [Precision Math](/functions-and-operators/precision-math.md) + + [List of Expressions for Pushdown](/functions-and-operators/expressions-pushed-down.md) + + [Constraints](/constraints.md) + + [Generated Columns](/generated-columns.md) + + [SQL Mode](/sql-mode.md) + + Transactions + + [Overview](/transaction-overview.md) + + [Isolation Levels](/transaction-isolation-levels.md) + + [Optimistic Transactions](/optimistic-transaction.md) + + [Pessimistic Transactions](/pessimistic-transaction.md) + + Garbage Collection (GC) + + [Overview](/garbage-collection-overview.md) + + [Configuration](/garbage-collection-configuration.md) + + [Views](/views.md) + + [Partitioning](/partitioned-table.md) + + [Character Set and Collation](/character-set-and-collation.md) + + System Tables + + [`mysql`](/system-tables/system-table-overview.md) + + [`information_schema`](/system-tables/system-table-information-schema.md) + + sql-diagnosis + + [`cluster_info`](/system-tables/system-table-cluster-info.md) + + [`cluster_hardware`](/system-tables/system-table-cluster-hardware.md) + + [`cluster_config`](/system-tables/system-table-cluster-config.md) + + [`cluster_load`](/system-tables/system-table-cluster-load.md) + + [`cluster_systeminfo`](/system-tables/system-table-cluster-systeminfo.md) + + [`cluster_log`](/system-tables/system-table-cluster-log.md) + + [`metrics_schema`](/system-tables/system-table-metrics-schema.md) + + [`metrics_tables`](/system-tables/system-table-metrics-tables.md) + + [`metrics_summary`](/system-tables/system-table-metrics-summary.md) + + [`inspection_result`](/system-tables/system-table-inspection-result.md) + + [`inspection_summary`](/system-tables/system-table-inspection-summary.md) + + UI + + TiDB Dashboard + + [Overview](/dashboard/dashboard-intro.md) + + Maintain + + [Deploy](/dashboard/dashboard-ops-deploy.md) + + [Reverse Proxy](/dashboard/dashboard-ops-reverse-proxy.md) + + [Secure](/dashboard/dashboard-ops-security.md) + + [Access](/dashboard/dashboard-access.md) + + [Overview Page](/dashboard/dashboard-overview.md) + + [Cluster Info Page](/dashboard/dashboard-cluster-info.md) + + [Key Visualizer Page](/dashboard/dashboard-key-visualizer.md) + + SQL Statements Analysis + + [SQL Statements Page](/dashboard/dashboard-statement-list.md) + + [SQL Details Page](/dashboard/dashboard-statement-details.md) + + [Slow Queries Page](/dashboard/dashboard-slow-query.md) + + Cluster Diagnostics + + [Access Cluster Diagnostics Page](/dashboard/dashboard-diagnostics-access.md) + + [View Diagnostics Report](/dashboard/dashboard-diagnostics-report.md) + + [Use Diagnostics](/dashboard/dashboard-diagnostics-usage.md) + + [Search Logs Page](/dashboard/dashboard-log-search.md) + + [Profile Instances Page](/dashboard/dashboard-profiling.md) + + [FAQ](/dashboard/dashboard-faq.md) + + CLI + + [tikv-ctl](/tikv-control.md) + + [pd-ctl](/pd-control.md) + + [tidb-ctl](/tidb-control.md) + + [pd-recover](/pd-recover.md) + + Command Line Flags + + [tidb-server](/command-line-flags-for-tidb-configuration.md) + + [tikv-server](/command-line-flags-for-tikv-configuration.md) + + [pd-server](/command-line-flags-for-pd-configuration.md) + + Configuration File Parameters + + [tidb-server](/tidb-configuration-file.md) + + [tikv-server](/tikv-configuration-file.md) + + [tiflash-server](/tiflash/tiflash-configuration.md) + + [pd-server](/pd-configuration-file.md) + + System Variables + + [MySQL System Variables](/system-variables.md) + + [TiDB Specific System Variables](/tidb-specific-system-variables.md) + + Storage Engines + + TiFlash + + [Overview](/tiflash/tiflash-overview.md) + + [Use TiFlash](/tiflash/use-tiflash.md) + + [FAQ](/tiflash/tiflash-faq.md) + + TiUP + + [Overview](/tiup/tiup-overview.md) + + [Manage TiUP Components](/tiup/manage-tiup-component.md) + + TiUP Components + + [tiup-playground](/tiup/tiup-playground.md) + + [tiup-cluster](/tiup/tiup-cluster.md) + + [tiup-mirror](/tiup/tiup-mirrors.md) + + [tiup-bench](/tiup/tiup-bench.md) + + [Errors Codes](/error-codes.md) + FAQs - [TiDB FAQs](/faq/tidb-faq.md) - [TiDB Lightning FAQs](/tidb-lightning/tidb-lightning-faq.md) - [Upgrade FAQs](/faq/upgrade-faq.md) -+ Support - - [Support Resources](/support.md) - - [Report an Issue](/report-issue.md) -+ Contribute - - [Contribute to TiDB](/contribute.md#contribute-to-tidb) - - [Improve the Docs](/contribute.md#improve-the-docs) -- [Adopters](/adopters.md) -- [Roadmap](/roadmap.md) -+ [Releases](/releases/release-notes.md) ++ [Glossary](/glossary.md) ++ Release Notes + + [All Releases](/releases/release-notes.md) + v4.0 - [4.0 GA](/releases/release-4.0-ga.md) - [4.0.0-rc.2](/releases/release-4.0.0-rc.2.md) @@ -529,4 +495,3 @@ - [RC3](/releases/release-rc.3.md) - [RC2](/releases/release-rc.2.md) - [RC1](/releases/release-rc.1.md) -+ [Glossary](/glossary.md) diff --git a/production-deployment-using-tiup.md b/production-deployment-using-tiup.md index 630ce0182a524..5ee441433fff9 100644 --- a/production-deployment-using-tiup.md +++ b/production-deployment-using-tiup.md @@ -2,7 +2,7 @@ title: Deploy a TiDB Cluster Using TiUP summary: Learn how to easily deploy a TiDB cluster using TiUP. category: how-to -aliases: ['/docs/stable/how-to/deploy/orchestrated/tiup/'] +aliases: ['/docs/stable/how-to/deploy/orchestrated/tiup/','/docs/stable/tiflash/deploy-tiflash/'] --- # Deploy a TiDB Cluster Using TiUP diff --git a/ticdc/deploy-ticdc.md b/ticdc/deploy-ticdc.md deleted file mode 100644 index 3c5eb55bb31fd..0000000000000 --- a/ticdc/deploy-ticdc.md +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: Deploy and use TiCDC -summary: Learn how to deploy and use TiCDC to replicate incremental data. -category: reference -aliases: ['/docs/stable/reference/tools/ticdc/deploy/'] ---- - -# Deploy and use TiCDC - -This document introduces how to deploy and use TiCDC to replicate incremental data. - -## Step 1: Deploy TiCDC cluster - -This section describes how to deploy TiCDC in the following different scenarios: - -- [Fresh deploy TiCDC using TiUP](#fresh-deploy-ticdc-using-tiup) -- [Add TiCDC component to an existing TiDB cluster using TiUP](#add-ticdc-component-to-an-existing-tidb-cluster-using-tiup) -- [Manually add TiCDC component to an existing TiDB cluster](#manually-add-ticdc-component-to-an-existing-tidb-cluster) - -### Fresh deploy TiCDC using TiUP - -TiUP cluster is a deployment tool for TiDB 4.0 and later versions. You must deploy and run TiCDC on TiDB v4.0.0-rc.1 or a later version. - -To deploy TiCDC, take the following steps: - -1. [Install TiUP](/production-deployment-using-tiup.md). - -2. Install the TiUP cluster component: - - {{< copyable "shell-regular" >}} - - ```shell - tiup cluster - ``` - -3. Edit the topology configuration file, and save it as `topology.yaml`: - - Refer to the [full configuration file template](https://github.com/pingcap-incubator/tiup-cluster/blob/master/examples/topology.example.yaml). - - In addition to configuring the TiDB cluster deployment, you also need to configure the CDC server IP under the `cdc_servers` section. Currently the configuration only supports IP, not domain name. - - {{< copyable "" >}} - - ```ini - pd_servers: - - host: 172.19.0.101 - - host: 172.19.0.102 - - host: 172.19.0.103 - - tidb_servers: - - host: 172.19.0.101 - - tikv_servers: - - host: 172.19.0.101 - - host: 172.19.0.102 - - host: 172.19.0.103 - - cdc_servers: - - host: 172.19.0.101 - - host: 172.19.0.102 - - host: 172.19.0.103 - ``` - -4. Finish the following steps according to the TiUP deployment process: - - Deploy the TiDB cluster. `test` is the cluster name: - - {{< copyable "shell-regular" >}} - - ```shell - tiup cluster deploy test v4.0.0-rc.1 topology.yaml -i ~/.ssh/id_rsa - ``` - - Start the TiDB cluster: - - {{< copyable "shell-regular" >}} - - ```shell - tiup cluster start test - ``` - -5. View the cluster status: - - {{< copyable "shell-regular" >}} - - ```shell - tiup cluster display test - ``` - -### Add TiCDC component to an existing TiDB cluster using TiUP - -1. Check if your TiDB version supports TiCDC. If not, upgrade the TiDB cluster to 4.0.0 rc.1 or later versions. - -2. Refer to [Scale out a TiDB/TiKV/PD/TiCDC node](/scale-tidb-using-tiup.md#scale-out-a-tidbpdtikv-node) and deploy TiCDC. - - This is an example of the scale-out configuration file: - - ```shell - vi scale-out.yaml - ``` - - ``` - cdc_servers: - - host: 10.0.1.5 - - host: 10.0.1.6 - - host: 10.0.1.7 - ``` - - Run the scale-out command: - - {{< copyable "shell-regular" >}} - - ```shell - tiup cluster scale-out scale-out.yaml - ``` - -### Manually add TiCDC component to an existing TiDB cluster - -Suppose that there is a PD node (the client URL is `10.0.10.25:2379`) in the PD cluster that can provide services. If you want to deploy three TiCDC nodes, start the TiCDC cluster using the following commands. You only need to specify the same PD address, and the newly started TiCDC nodes will automatically be added to the TiCDC cluster. - -{{< copyable "shell-regular" >}} - -```shell -cdc server --pd=http://10.0.10.25:2379 --log-file=ticdc_1.log --addr 0.0.0.0:8301 --advertise-addr=127.0.0.1:8301 -cdc server --pd=http://10.0.10.25:2379 --log-file=ticdc_2.log --addr 0.0.0.0:8302 --advertise-addr=127.0.0.1:8302 -cdc server --pd=http://10.0.10.25:2379 --log-file=ticdc_3.log --addr 0.0.0.0:8303 --advertise-addr=127.0.0.1:8303 -``` - -## Step 2: Create replication task - -To replicate all upstream database schemas and tables (except system tables) to the downstream MySQL, use the following command to create a replication task: - -{{< copyable "shell-regular" >}} - -```shell -cdc cli changefeed create --pd=http://10.0.10.25:2379 --start-ts=415238226621235200 --sink-uri="mysql://root:123456@127.0.0.1:3306/" -``` - -The parameters in the above command are described as follows: - -- `pd`: The URL of the PD client. -- `start-ts`: Specifies the starting TSO of the replication task. If this parameter is not specified or specified as `0`, the current TSO is used as the starting TSO of the replication task. -- `sink-uri`: The sink address. Currently, the address can be configured to `mysql`, `tidb`, or `kafka`. For how to configure sink URI, refer to [Configure Sink URI](/ticdc/sink-url.md). -- `config`: The configuration of the replication task. Currently, this configuration supports the black & white lists and skipping specific transaction of certain `commit-ts`. - -After executing the above command, TiCDC starts to replicate data to the downstream MySQL (`127.0.0.1:3306`) from the specified `start-ts` (`415238226621235200`). - -If you want to replicate data to a Kafka cluster, first create the topic in the Kafka cluster (for example, `cdc-test` in the following example is a topic), create partitions, and use the following command to create a replication task: - -{{< copyable "shell-regular" >}} - -```shell -cdc cli changefeed create --pd=http://10.0.10.25:2379 --start-ts=415238226621235200 --sink-uri="kafka://10.0.10.30:9092/cdc-test" -``` - -After executing the above command, TiCDC starts to replicate data to the downstream Kafka (`10.0.10.30:9092`) from the specified `start-ts`. diff --git a/tiflash/deploy-tiflash.md b/tiflash/deploy-tiflash.md deleted file mode 100644 index f76900ec161cf..0000000000000 --- a/tiflash/deploy-tiflash.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: Deploy a TiFlash Cluster -summary: Learn the requirements and methods of deploying a TiFlash cluster. -category: reference -aliases: ['/docs/stable/reference/tiflash/deploy/'] ---- - -# Deploy a TiFlash Cluster - -> **Note:** -> -> If you want to get a first-hand experience on how to use the TiFlash RC version, contact [PingCAP](mailto:info@pingcap.com) for more information and assistance. - -This document introduces the environment requirements for deploying a TiFlash cluster and the deployment methods in different scenarios. - -## Recommended hardware configuration - -This section provides hardware configuration recommendations based on different TiFlash deployment methods. - -### TiFlash standalone deployment - -* Minimum configuration: 32 VCore, 64 GB RAM, 1 SSD + n HDD -* Recommended configuration: 48 VCore, 128 GB RAM, 1 NVMe SSD + n SSD - -There is no limit to the number of target machines (one at least). A single machine can use multiple disks, but deploying multiple instances on a single machine is not recommended. - -It is recommended to use an SSD disk to buffer the real-time data being replicated and written to TiFlash. The performance of this disk need to be not lower than the hard disk used by TiKV. It is recommended that you use a better performance NVMe SSD and the SSD's capacity is not less than 10% of the total capacity. Otherwise, it might become the bottleneck of the amount of data that this node can handle. - -For other hard disks, you can use multiple HDDs or regular SSDs. A better hard disk will surely bring better performance. - -TiFlash supports [multi-disk deployment](/tiflash/tiflash-configuration.md#multi-disk-deployment), so there is no need to use RAID. - -### TiFlash and TiKV are deployed on the same node - -See [Hardware recommendations for TiKV server](/hardware-and-software-requirements.md#server-recommendations), and increase the memory capacity and the number of and CPU cores as needed. - -It is **not** recommended to deploy TiFlash and TiKV on the same disk to prevent mutual interference. - -Hard disk selection criteria are the same as [TiFlash standalone deployment](#tiflash-standalone-deployment). The total capacity of the hard disk is roughly: `the to-be-replicated data capacity of the entire TiKV cluster / the number of TiKV replicas * the number of TiFlash replicas`. - -For example, if the overall planned capacity of TiKV is 1TB, each Region in TiKV has 3 replicas, and each Region in TiFlash has 2 replicas, then the recommended capacity of TiFlash will be `1024GB / 3 * 2`. You can choose to replicate part of the tables instead of all. - -## TiDB version requirements - -Currently, the testing of TiFlash is based on the related components of TiDB 4.0 (including TiDB, PD, TiKV, and TiFlash). For the download method of TiDB 4.0, refer to the following installation and deployment steps. - -## Install and deploy TiFlash - -This section describes how to install and deploy TiFlash in the following scenarios: - -- [Fresh TiFlash deployment](#fresh-tiflash-deployment) -- [Add TiFlash component to an existing TiDB cluster](#add-tiflash-component-to-an-existing-tidb-cluster) - -> **Note:** -> -> 1. Before starting the TiFlash process, you must ensure that PD's Placement Rules feature is enabled (For how to enable it, see the **second step** in the [Add TiFlash component to an existing TiDB cluster](#add-tiflash-component-to-an-existing-tidb-cluster) section). -> 2. When TiFlash is running, you must ensure that PD's Placement Rules feature remains enabled. - -### Fresh TiFlash deployment - -TiUP cluster is the deployment tool for TiDB 4.0 or later versions. It is recommended that you use TiUP cluster to install and deploy TiFlash. The steps are as follows: - -1. [Install TiUP](/production-deployment-using-tiup.md#step-2-install-tiup-on-the-control-machine). - -2. Install the TiUP cluster component. - - {{< copyable "shell-regular" >}} - - ```shell - tiup cluster - ``` - -3. Write the topology configuration file and save it as `topology.yaml`. - - You can refer to [the topology configuration file template](https://github.com/pingcap-incubator/tiup-cluster/blob/master/examples/topology.example.yaml). - - In addition to configuring the TiDB cluster, you also need to configure the IP of TiFlash servers in `tiflash_servers`. Currently the configuration only supports IP but not domain name. - - If you need to deploy TiFlash, set `replication.enable-placement-rules` in the `pd` section to `true`. - - {{< copyable "" >}} - - ```ini - server_configs: - pd: - replication.enable-placement-rules: true - pd_servers: - - host: 172.19.0.101 - - host: 172.19.0.102 - - host: 172.19.0.103 - tidb_servers: - - host: 172.19.0.101 - tikv_servers: - - host: 172.19.0.101 - - host: 172.19.0.102 - - host: 172.19.0.103 - tiflash_servers: - - host: 172.19.0.103 - ``` - - If you want to customize the deployment directory, configure the `data_dir` parameter. If you want to [deploy TiFlash on multiple disks](/tiflash/tiflash-configuration.md#multi-disk-deployment), separate each directory with commas. For example: - - {{< copyable "" >}} - - ```ini - tiflash_servers: - - host: 172.19.0.103 - data_dir: /data1/tiflash/data,/data2/tiflash/data - ``` - -4. Refer to the TiUP deployment process, and complete the following steps: - - * Deploy the TiDB cluster (`test` is the cluster name): - - {{< copyable "shell-regular" >}} - - ```shell - tiup cluster deploy test v4.0.0-rc topology.yaml -i ~/.ssh/id_rsa - ``` - - * Start the TiDB cluster: - - {{< copyable "shell-regular" >}} - - ```shell - tiup cluster start test - ``` - -5. View the cluster status: - - {{< copyable "shell-regular" >}} - - ```shell - tiup cluster display test - ``` - -### Add TiFlash component to an existing TiDB cluster - -1. First, confirm that your current TiDB version supports TiFlash; otherwise, you need to upgrade your TiDB cluster to 4.0 rc or higher versions. - -2. Execute the `config set enable-placement-rules true` command in [pd-ctl](/pd-control.md) (`resources/bin` in the tidb-ansible directory includes the pd-ctl binary file) to enable PD's Placement Rules feature. - - Currently, pd-ctl is not connected to TiUP cluster, you need to [manually download pd-ctl](https://download.pingcap.org/tidb-v4.0.0-rc-linux-amd64.tar.gz). - -3. Refer to [Scale out a TiFlash node](/scale-tidb-using-tiup.md#scale-out-a-tiflash-node) and deploy TiFlash. diff --git a/tiflash/troubleshoot-tiflash.md b/tiflash/troubleshoot-tiflash.md index c246d5d09c747..7bf21c3f0a4cb 100644 --- a/tiflash/troubleshoot-tiflash.md +++ b/tiflash/troubleshoot-tiflash.md @@ -12,7 +12,7 @@ This section describes some commonly encountered issues when using TiFlash, the This is because TiFlash is in an abnormal state caused by configuration errors or environment issues. Take the following steps to identify the faulty component: -1. Check whether PD enables the `Placement Rules` feature (to enable the feature, see the step 2 of [Add TiFlash component to an existing TiDB cluster](/tiflash/deploy-tiflash.md#add-tiflash-component-to-an-existing-tidb-cluster): +1. Check whether PD enables the `Placement Rules` feature: {{< copyable "shell-regular" >}} @@ -20,7 +20,7 @@ This is because TiFlash is in an abnormal state caused by configuration errors o echo 'config show replication' | /path/to/pd-ctl -u http://: ``` - The expected result is `"enable-placement-rules": "true"`. + The expected result is `"enable-placement-rules": "true"`. If not enabled, [enable the Placement Rules feature](/configure-placement-rules.md#enable-placement-rules). 2. Check whether the TiFlash process is working correctly by viewing `UpTime` on the TiFlash-Summary monitoring panel. diff --git a/tiup/package-tiup-component.md b/tiup/package-tiup-component.md deleted file mode 100644 index d1e1f2290bc57..0000000000000 --- a/tiup/package-tiup-component.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: Package a Component -summary: Learn how to package a component. -category: tools -aliases: ['/docs/stable/reference/tools/tiup/package-component/'] ---- - -# Package a Component - -If you want to add a new component or add a version of an existing component, use the `tar` command to package the component files and then upload these packaged files to the mirror repository. Packaging with `tar` is not difficult. However, it is not easy to update the meta information of the repository without destroying the information of existing components. - -To make it easy, TiUP provides the `package` component, which is used to package the newly added TiUP component and generate the directory of this component. - -## TiUP `package` overview - -Execute the following command to get the help information of the `mirrors` component: - -{{< copyable "shell-root" >}} - -```bash -tiup package --help -``` - -``` -Package a tiup component and generate package directory - -Usage: - tiup package target [flags] - -Flags: - -C, -- string Change directory before compress - --arch string Target ARCH of the package (default "GOARCH") - --desc string Description of the package - --entry string Entry point of the package - -h, --help help for tiup - --hide tiup list Don't show the component in tiup list - --name string Name of the package - --os string Target OS of the package (default "GOOS") - --release string Version of the package - --standalone Can the component run standalone -``` - -## Usage example: Add the `Hello World` component - -This section introduces the development and packaging process of the `Hello World` component. The only function of this component is to output the content of its configuration file. The content is "Hello World". - -To make it simple, the bash script is used to develop this component. See the following steps for details: - -1. Create the configuration file of the `Hello World` component. The content of this file is "Hello World". - - {{< copyable "shell-regular" >}} - - ```shell - cat > config.txt << EOF - Hello World - EOF - ``` - -2. Create an executable file: - - {{< copyable "shell-regular" >}} - - ```shell - cat > hello.sh << EOF - #! /bin/sh - cat \${TIUP_COMPONENT_INSTALL_DIR}/config.txt - EOF - - chmod 755 hello.sh - ``` - - The `TIUP_COMPONENT_INSTALL_DIR` environment variable is passed in when TiUP is running. This variable points to the installation directory of the component. - -3. Refer to [Create a Private Mirror](/tiup/tiup-mirrors.md) and create an offline or a private mirror accordingly. Make sure the `TIUP_MIRRORS` variable points to the mirror after this mirror is created. - - > **Note:** - > - > You cannot publish your package, because the `publish` feature of the official mirror is currently unavailable. - -4. Packaging: - - {{< copyable "shell-regular" >}} - - ```shell - tiup package hello.sh config.txt --name=hello --entry=hello.sh --release=v0.0.1 - ``` - - A `package` directory is created in this step. The packaged files and the meta information are stored in this directory. - -5. Upload the packaged files to the repository: - - You can upload the packaged files only to the mirror created by yourself in step 3, because currently you cannot publish the files to the official repository. Execute the following command to copy all files in the `package` directory into ``. For details of ``, refer to the [`mirrors` description](/tiup/tiup-mirrors.md#mirrors-description). - - {{< copyable "shell-regular" >}} - - ```bash - cp package/* path/to/mirror/ - ``` - - If the directory created in step 3 happens to be in the current directory and the directory name happens to be `package`, you do not need to copy the files manually. - -6. Check whether the `Hello World` component is created successfully: - - {{< copyable "shell-root" >}} - - ```bash - tiup list hello - ``` - - ``` - Available versions for hello (Last Modified: 2020-04-23T16:45:53+08:00): - Version Installed Release: Platforms - ------- --------- -------- --------- - v0.0.1 2020-04-23T16:51:41+08:00 darwin/amd64 - ``` - - {{< copyable "shell-root" >}} - - ```bash - tiup hello - ``` - - ``` - The component `hello` is not installed; downloading from repository. - Starting component `hello`: /Users/joshua/.tiup/components/hello/v0.0.1/hello.sh - Hello World - ``` diff --git a/tiup/tiup-overview.md b/tiup/tiup-overview.md index 43f2b18888e5b..48697c300164b 100644 --- a/tiup/tiup-overview.md +++ b/tiup/tiup-overview.md @@ -114,7 +114,6 @@ The output is long but you can focus on only two parts: - client: used to connect to a TiDB cluster in a local machine - mirrors: used to clone a private mirror from an official mirror - cluster: used to deploy a TiDB cluster for production environments - - package: used to package a new TiUP component - bench: used to stress test the database - doc: used to open online document @@ -132,5 +131,4 @@ All TiUP commands are described in [Manage TiUP Components with TiUP Commands](/ - [Quickly Deploy a Local TiDB Cluster](/tiup/tiup-playground.md): introduce the playground component - [Deploy and Maintain an Online TiDB Cluster](/tiup/tiup-cluster.md): introduce the cluster component - [Create a Private Mirror](/tiup/tiup-mirrors.md): introduce the mirrors component -- [Package a Component](/tiup/package-tiup-component.md): introduce the package component - [Stress Test TiDB Using TiUP](/tiup/tiup-bench.md): introduce the bench component diff --git a/tune-tikv-performance.md b/tune-tikv-performance.md index 49dd2660e31ec..344ee66d42bc1 100644 --- a/tune-tikv-performance.md +++ b/tune-tikv-performance.md @@ -1,11 +1,11 @@ --- -title: Tune TiKV Performance +title: TiKV Memory Parameters Performance Tuning summary: Learn how to tune the TiKV parameters for optimal performance. category: reference aliases: ['/docs/stable/reference/performance/tune-tikv/'] --- -# Tune TiKV Performance +# TiKV Memory Parameters Performance Tuning This document describes how to tune the TiKV parameters for optimal performance.