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

sql: update tidb specific link description #692

Merged
merged 9 commits into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion sql/tidb-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can set the service parameters using the command line or the configuration f

## TiDB system variable

TiDB is compatible with MySQL system variables, and defines some unique system variables to adjust the database behavior. For more information, see [The Proprietary System Variables and Syntaxes in TiDB](../sql/tidb-specific.md).
TiDB is compatible with MySQL system variables, and defines some unique system variables to adjust the database behavior. For more information, see [TiDB Specific System Variables](../sql/tidb-specific.md).

## TiDB system table

Expand Down
10 changes: 5 additions & 5 deletions sql/tidb-specific.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ category: user guide

TiDB contains a number of system variables which are specific to its usage, and **do not** apply to MySQL. These variables start with a `tidb_` prefix, and can be tuned to optimize system performance.

## System variable
## System variables

Variables can be set with the `SET` statement, for example:

Expand Down Expand Up @@ -289,11 +289,11 @@ set @@global.tidb_distsql_scan_concurrency = 10
- This variable is used to change the default priority for statements executed on a TiDB server. A use case is to ensure that a particular user that is performing OLAP queries receives lower priority than users performing OLTP queries.
- You can set the value of this variable to `NO_PRIORITY`, `LOW_PRIORITY`, `DELAYED` or `HIGH_PRIORITY`.

## Optimizer Hint
## Optimizer Hints

On the basis of MySQL’s `Optimizer Hint` Syntax, TiDB adds some proprietary `Hint` syntaxes. When using the `Hint` syntax, the TiDB optimizer will try to use the specific algorithm, which performs better than the default algorithm in some scenarios.
The `Hint` syntax is included in comments like `/*+ xxx */`, and in MySQL client versions earlier than 5.7.7, the comment is removed by default. If you want to use the `Hint` syntax in these earlier versions, add the `--comments` option when starting the client. For example: `mysql -h 127.0.0.1 -P 4000 -uroot --comments`.
TiDB supports optimizer hints, based on the comment-like syntax introduced in MySQL 5.7. i.e. `/*+ TIDB_XX(t1, t2) */`. Use of optimizer hints is recommended in cases where the TiDB optimizer selects a less optimal query plan.

> **Note:** MySQL command-line clients earlier than 5.7.7 strip optimizer hints by default. If you want to use the `Hint` syntax in these earlier versions, add the `--comments` option when starting the client. For example: `mysql -h 127.0.0.1 -P 4000 -uroot --comments`.

### TIDB_SMJ(t1, t2)

Expand Down
4 changes: 2 additions & 2 deletions sql/variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ The following MySQL system variables are fully supported in TiDB and have the sa
| tx_isolation | GLOBAL \| SESSION | the isolation level of a transaction |
| hostname | NONE | the hostname of the TiDB server |

## The proprietary system variables and syntaxes in TiDB
## TiDB Specific System Variables

See [The Proprietary System Variables and Syntax in TiDB](../sql/tidb-specific.md).
See [TiDB Specific System Variables](../sql/tidb-specific.md).