Skip to content

Commit

Permalink
Fix 15 broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
CaitinChen committed Jun 6, 2019
1 parent 3533e38 commit 94280e5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions tidb-21-ga-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tags: ['TiDB']
* TiDB 插入和更新宽表,性能提升接近 20 倍
* 支持在配置文件中设置单个查询的内存使用上限
* 优化 `Hash Join` 的执行过程,当 Join 类型为 `Inner Join` 或者 `Semi Join` 时,如果内表为空,不再读取外表数据,快速返回结果
* 支持 [`EXPLAIN ANALYZE`](https://github.com/pingcap/docs/blob/master/sql/understanding-the-query-execution-plan.md#explain-analyze-output-format) 语句,用于查看 Query 执行过程中各个算子的运行时间,返回结果行数等运行时统计信息
* 支持 [`EXPLAIN ANALYZE`](https://pingcap.com/docs-cn/dev/reference/performance/understanding-the-query-execution-plan/#span-id-explain-analyze-output-format-explain-analyze-输出格式-span) 语句,用于查看 Query 执行过程中各个算子的运行时间,返回结果行数等运行时统计信息

### 统计信息

Expand Down Expand Up @@ -107,7 +107,7 @@ tags: ['TiDB']
* 优化 Coordinator 的启动,减少重启 PD 时带来的不必要调度
* 优化 Balance Scheduler 频繁调度小 Region 的问题
* 优化 Region merge,调度时考虑 Region 中数据的行数
* [新增一些控制调度策略的开关](https://github.com/pingcap/docs-cn/blob/master/tools/pd-control.md#config-show--set--)
* [新增一些控制调度策略的开关](https://pingcap.com/docs-cn/dev/reference/tools/pd-control/#config-show--set--)
* 完善[调度模拟器](https://github.com/pingcap/pd/tree/release-2.1/tools/pd-simulator),添加调度场景模拟

### API 及运维工具
Expand All @@ -117,11 +117,11 @@ tags: ['TiDB']
* 新增 [`GCSafePoint` 接口](https://github.com/pingcap/kvproto/blob/8e3f33ac49297d7c93b61a955531191084a2f685/proto/pdpb.proto#L64-L66),用于支持 TiDB 并发分布式 GC
* 新增 [`GetAllStores` 接口](https://github.com/pingcap/kvproto/blob/8e3f33ac49297d7c93b61a955531191084a2f685/proto/pdpb.proto#L32),用于支持 TiDB 并发分布式 GC
* pd-ctl 新增:
* [使用统计信息进行 Region split](https://github.com/pingcap/docs-cn/blob/release-2.1/tools/pd-control.md#operator-show--add--remove)
* [调用 `jq` 来格式化 JSON 输出](https://github.com/pingcap/docs-cn/blob/release-2.1/tools/pd-control.md#jq-%E6%A0%BC%E5%BC%8F%E5%8C%96-json-%E8%BE%93%E5%87%BA%E7%A4%BA%E4%BE%8B)
* [查询指定 store 的 Region 信息](https://github.com/pingcap/docs-cn/blob/release-2.1/tools/pd-control.md#region-store-store_id)
* [查询按 version 排序的 topN 的 Region 列表](https://github.com/pingcap/docs-cn/blob/release-2.1/tools/pd-control.md#region-topconfver-limit)
* [查询按 size 排序的 topN 的 Region 列表](https://github.com/pingcap/docs-cn/blob/release-2.1/tools/pd-control.md#region-topsize-limit)
* [使用统计信息进行 Region split](https://pingcap.com/docs-cn/dev/reference/tools/pd-control/#operator-show--add--remove)
* [调用 `jq` 来格式化 JSON 输出](https://pingcap.com/docs-cn/dev/reference/tools/pd-control/#jq-格式化-json-输出示例)
* [查询指定 store 的 Region 信息](https://pingcap.com/docs-cn/dev/reference/tools/pd-control/#region-store-store_id)
* [查询按 version 排序的 topN 的 Region 列表](https://pingcap.com/docs-cn/dev/reference/tools/pd-control/#region-topconfver-limit)
* [查询按 size 排序的 topN 的 Region 列表](https://pingcap.com/docs-cn/dev/reference/tools/pd-control/#region-topsize-limit)
* [更精确的 TSO 解码](https://github.com/pingcap/pd/pull/1242)
* [pd-recover](https://github.com/pingcap/docs-cn/blob/master/v2.1/tools/pd-recover.md) 不再需要提供 max-replica 参数

Expand Down
14 changes: 7 additions & 7 deletions tidb-best-practice.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ TiDB 支持完整的二级索引,并且是全局索引,很多查询可以通
+ 查询并发度

数据分散在很多 Region 上,所以 TiDB 在做查询的时候会并发进行,默认的并发度比较保守,因为过高的并发度会消耗大量的系统资源,且对于 OLTP 类型的查询,往往不会涉及到大量的数据,较低的并发度已经可以满足需求。对于 OLAP 类型的 Query,往往需要较高的并发度。所以 TiDB 支持通过 System Variable 来调整查询并发度。
- [tidb_distsql_scan_concurrency](https://github.com/pingcap/docs-cn/blob/master/sql/tidb-specific.md#tidb_distsql_scan_concurrency)
- [tidb_distsql_scan_concurrency](https://pingcap.com/docs-cn/dev/reference/configuration/tidb-server/tidb-specific-variables/#tidb-distsql-scan-concurrency)

在进行扫描数据的时候的并发度,这里包括扫描 Table 以及索引数据。

- [tidb_index_lookup_size](https://github.com/pingcap/docs-cn/blob/master/sql/tidb-specific.md#tidb_index_lookup_size)
- [tidb_index_lookup_size](https://pingcap.com/docs-cn/dev/reference/configuration/tidb-server/tidb-specific-variables/#tidb-index-lookup-size)

如果是需要访问索引获取行 ID 之后再访问 Table 数据,那么每次会把一批行 ID 作为一次请求去访问 Table 数据,这个参数可以设置 Batch 的大小,较大的 Batch 会使得延迟增加,较小的 Batch 可能会造成更多的查询次数。这个参数的合适大小与查询涉及的数据量有关。一般不需要调整。

- [tidb_index_lookup_concurrency](https://github.com/pingcap/docs-cn/blob/master/sql/tidb-specific.md#tidb_index_lookup_concurrency)
- [tidb_index_lookup_concurrency](https://pingcap.com/docs-cn/dev/reference/configuration/tidb-server/tidb-specific-variables/#tidb-index-lookup-concurrency)

如果是需要访问索引获取行 ID 之后再访问 Table 数据,每次通过行 ID 获取数据时候的并发度通过这个参数调节。

+ 通过索引保证结果顺序

索引除了可以用来过滤数据之外,还能用来对数据排序,首先按照索引的顺序获取行 ID,然后再按照行 ID 的返回顺序返回行的内容,这样可以保证返回结果按照索引列有序。前面提到了扫索引和获取 Row 之间是并行 + Pipeline 模式,如果要求按照索引的顺序返回 Row,那么这两次查询之间的并发度设置的太高并不会降低延迟,所以默认的并发度比较保守。可以通过 [tidb_index_serial_scan_concurrency](https://github.com/pingcap/docs-cn/blob/master/sql/tidb-specific.md#tidb_index_serial_scan_concurrency) 变量进行并发度调整。
索引除了可以用来过滤数据之外,还能用来对数据排序,首先按照索引的顺序获取行 ID,然后再按照行 ID 的返回顺序返回行的内容,这样可以保证返回结果按照索引列有序。前面提到了扫索引和获取 Row 之间是并行 + Pipeline 模式,如果要求按照索引的顺序返回 Row,那么这两次查询之间的并发度设置的太高并不会降低延迟,所以默认的并发度比较保守。可以通过 [tidb_index_serial_scan_concurrency](https://pingcap.com/docs-cn/dev/reference/configuration/tidb-server/tidb-specific-variables/#tidb-index-serial-scan-concurrency) 变量进行并发度调整。

+ 逆序索引

Expand All @@ -119,12 +119,12 @@ TiDB 支持完整的二级索引,并且是全局索引,很多查询可以通

### 部署

在部署之前请务必阅读 [TiDB 部署建议以及对硬件的需求](https://github.com/pingcap/docs-cn/blob/master/op-guide/recommendation.md)
在部署之前请务必阅读 [TiDB 部署建议以及对硬件的需求](https://pingcap.com/docs-cn/dev/how-to/deploy/hardware-recommendations/)

推荐通过 [TiDB-Ansible](https://github.com/pingcap/tidb-ansible "TiDB-Ansible")
部署 TiDB 集群,这个工具可以部署、停止、销毁、升级整个集群,非常方便易用。

具体的使用文档在[这里](https://github.com/pingcap/docs-cn/blob/master/op-guide/ansible-deployment.md)。非常不推荐手动部署,后期的维护和升级会很麻烦。
具体的使用文档在[这里](https://pingcap.com/docs-cn/dev/how-to/deploy/orchestrated/ansible/)。非常不推荐手动部署,后期的维护和升级会很麻烦。

### 导入数据

Expand Down Expand Up @@ -168,7 +168,7 @@ for i from 0 to 23:

### 查询

看业务的查询需求以及具体的语句,可以参考[这篇文档](https://github.com/pingcap/docs-cn/blob/master/sql/tidb-specific.md)
看业务的查询需求以及具体的语句,可以参考[这篇文档](https://pingcap.com/docs-cn/dev/reference/configuration/tidb-server/tidb-specific-variables)
可以通过 SET 语句控制 SQL 执行的并发度,另外通过 Hint 控制 Join 物理算子选择。

另外 MySQL 标准的索引选择 Hint 语法,也可以用,通过 `Use Index/Ignore Index hint` 控制优化器选择索引。
Expand Down
2 changes: 1 addition & 1 deletion tidb-source-code-reading-22.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Hash Aggregation 的执行阶段可分为如下图所示的 5 步:

![](media/tidb-source-code-reading-22/4.png)

在 TiDB 中,使用 [EXPLAIN ANALYZE](https://github.com/pingcap/docs-cn/blob/master/sql/understanding-the-query-execution-plan.md#explain-analyze-%E8%BE%93%E5%87%BA%E6%A0%BC%E5%BC%8F) 可以获取 SQL 的执行统计信息。因篇幅原因此处仅贴出 TPC-H query-17 部分算子的 EXPLAIN ANALYZE 结果。
在 TiDB 中,使用 [EXPLAIN ANALYZE](https://pingcap.com/docs-cn/dev/reference/performance/understanding-the-query-execution-plan/#span-id-explain-analyze-output-format-explain-analyze-输出格式-span) 可以获取 SQL 的执行统计信息。因篇幅原因此处仅贴出 TPC-H query-17 部分算子的 EXPLAIN ANALYZE 结果。

`HashAgg` 单线程计算时:

Expand Down

0 comments on commit 94280e5

Please sign in to comment.