Skip to content

Commit

Permalink
add sql tuning files
Browse files Browse the repository at this point in the history
  • Loading branch information
yikeke committed Jul 23, 2020
1 parent 735062d commit 64323c9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
+ [TiFlash Tuning](/tiflash/tune-tiflash-performance.md)
+ [Coprocessor Cache](/coprocessor-cache.md)
+ SQL Tuning
+ [Overview](/sql-tuning-overview.md)
+ [SQL Tuning with `EXPLAIN`](/query-execution-plan.md)
+ SQL Optimization
+ [SQL Optimization Process](/sql-optimization-concepts.md)
Expand All @@ -120,6 +121,7 @@
+ [Distinct Optimization](/agg-distinct-optimization.md)
+ [Prepare Execution Plan Cache](/sql-prepare-plan-cache.md)
+ Control Execution Plan
+ [Overview](/control-execution-plan.md)
+ [Optimizer Hints](/optimizer-hints.md)
+ [SQL Plan Management](/sql-plan-management.md)
+ [Access Tables Using `IndexMerge`](/index-merge.md)
Expand Down
Empty file added control-execution-plan.md
Empty file.
11 changes: 11 additions & 0 deletions sql-tuning-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: SQL Tuning Overview
---

# SQL Tuning Overview

The previous "Troubleshooting" chapter describes some ways to locate some queries that affect the cluster, and that if some queries' execution time does not meet expectations, you need to analyze the execution result to find the cause. In this chapter, the following sections introduce how to tune a specific query:

- In the first section, [Understand the Query Execution Plan](/query-execution-plan.md) introduces how to use the `EXPLAIN` and `EXPLAIN ANALYZE` statements to understand how TiDB executes a query.
- In the second section, [SQL Optimization Process](/sql-optimization-concepts.md) introduces the optimizations used internally by TiDB, which involves some equivalent SQL conversions and the selection of physical plans. This section helps you understand how TiDB generates the final execution plan.
- In the third section, [Control Execution Plan](/control-execution-plan.md) introduces the ways to control the generation of the execution plan, which improves the execution speed of the query and reduces its impact on the overall performance of the cluster or online business.

0 comments on commit 64323c9

Please sign in to comment.