Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
51a3ece
Update overview.md
scsldb May 20, 2020
955abf9
Merge branch 'docs-special-week' into docs-speical-week-overview
lilin90 May 20, 2020
a1216f1
Update key-features.md
scsldb May 20, 2020
ea4bd95
Update mysql-compatibility.md
scsldb May 20, 2020
78d177b
Update mysql-compatibility.md
scsldb May 20, 2020
e8215d7
Update mysql-compatibility.md
scsldb May 21, 2020
3359b90
Update mysql-compatibility.md
scsldb May 21, 2020
8b9dee5
Update mysql-compatibility.md
scsldb May 21, 2020
2348c6d
Update tidb-limitations.md
scsldb May 21, 2020
be34c99
Update tidb-limitations.md
scsldb May 21, 2020
3bb6475
Update tidb-limitations.md
scsldb May 21, 2020
0fed0c6
Update tidb-limitations.md
scsldb May 21, 2020
60203ea
Update tidb-limitations.md
scsldb May 21, 2020
ea0e1de
Update tidb-limitations.md
scsldb May 21, 2020
5878942
Update overview.md
scsldb May 21, 2020
0f3941e
Update overview.md
scsldb May 21, 2020
4c89b3b
Update key-features.md
scsldb May 21, 2020
03a17a7
Update overview.md
scsldb May 21, 2020
93c40e7
Update overview.md
scsldb May 21, 2020
7d0d8ad
Update overview.md
scsldb May 21, 2020
7828fbc
Update key-features.md
scsldb May 21, 2020
4ba0ff3
Update mysql-compatibility.md
scsldb May 21, 2020
a7ca276
Update overview.md
scsldb May 22, 2020
0ffb70b
some typos
meyu44 May 22, 2020
b300d30
Update key-features.md
scsldb May 23, 2020
a6061a3
Update overview.md
scsldb May 23, 2020
9fc1abd
Update mysql-compatibility.md
scsldb May 23, 2020
33d37d0
Update tidb-limitations.md
scsldb May 23, 2020
9b85868
Update key-features.md
scsldb May 23, 2020
faee52a
Update key-features.md
scsldb May 23, 2020
846a1d4
Update key-features.md
scsldb May 23, 2020
68f5849
Update key-features.md
scsldb May 23, 2020
3f58a0a
Merge branch 'docs-special-week' into docs-speical-week-overview
scsldb May 24, 2020
a69ec19
Create Sysbench.md
scsldb May 26, 2020
6376433
Create TPC-C.md
scsldb May 26, 2020
e96d05e
Update TPC-C.md
scsldb May 26, 2020
cf6c493
Update Sysbench.md
scsldb May 26, 2020
360b538
Merge branch 'docs-special-week' into docs-speical-week-overview
scsldb May 26, 2020
1d8bc3a
Merge branch 'docs-special-week' into docs-speical-week-overview
scsldb May 26, 2020
1ece486
Update Sysbench.md
scsldb May 26, 2020
33caadf
Update TPC-C.md
scsldb May 26, 2020
4ebc63e
Rename Sysbench.md to sysbench.md
scsldb May 26, 2020
9a272fa
Rename TPC-C.md to benchmark-tpcc-v3vsv4.md
scsldb May 26, 2020
0aaf061
Update and rename sysbench.md to benchmark-sysbench-v3vsv4.md
scsldb May 26, 2020
8ec8592
Update benchmark-sysbench-v3vsv4.md
scsldb May 26, 2020
1f5c8a4
Update benchmark-tpcc-v3vsv4.md
scsldb May 26, 2020
f42207e
Rename benchmark-sysbench-v3vsv4.md to benchmark/benchmark-sysbench-v…
scsldb May 26, 2020
a1ae287
Rename benchmark-tpcc-v3vsv4.md to benchmark/benchmark-tpcc-v3vsv4.md
scsldb May 26, 2020
d9026ac
Merge branch 'docs-special-week' into docs-speical-week-overview
scsldb May 26, 2020
d797e45
Update benchmark-sysbench-v3vsv4.md
scsldb May 26, 2020
815689a
Merge branch 'docs-special-week' into docs-speical-week-overview
scsldb May 26, 2020
10f93ec
Update benchmark-sysbench-v3vsv4.md
scsldb May 26, 2020
95e766b
Update benchmark-sysbench-v3vsv4.md
scsldb May 26, 2020
a44e334
Update benchmark-tpcc-v3vsv4.md
scsldb May 26, 2020
3f3d62c
Merge branch 'docs-special-week' into docs-speical-week-overview
scsldb May 26, 2020
8d0f979
Update mysql-compatibility.md
scsldb May 26, 2020
fb4b008
Merge branch 'docs-special-week' into docs-speical-week-overview
scsldb May 26, 2020
91c3194
benchmark: rename, fix format and update wording
lilin90 May 26, 2020
86e4527
Update overview.md
scsldb May 26, 2020
b256c8b
Update key-features.md
scsldb May 26, 2020
db186b7
Update v4.0-performance-benchmarking-with-tpcc.md
scsldb May 26, 2020
48b1a91
Update v4.0-performance-benchmarking-with-tpcc.md
scsldb May 26, 2020
fa73878
Update v4.0-performance-benchmarking-with-tpcc.md
scsldb May 26, 2020
ed47834
Rename key-features.md to base-features.md
scsldb May 26, 2020
bba61a6
Update TOC.md
scsldb May 26, 2020
59393b3
Rename base-features.md to basic-features.md
scsldb May 26, 2020
870d4e8
Merge branch 'docs-special-week' into docs-speical-week-overview
scsldb May 26, 2020
77f8b99
Merge branch 'docs-special-week' into docs-speical-week-overview
scsldb May 26, 2020
bce0c17
Update mysql-compatibility.md
scsldb May 26, 2020
2558b2d
Update v4.0-performance-benchmarking-with-tpcc.md
scsldb May 26, 2020
229afb3
Delete benchmark-tpcc-v3vsv4.md
scsldb May 26, 2020
aecb3f2
Update mysql-compatibility.md
scsldb May 26, 2020
4b0e632
Add aliases for key features
lilin90 May 26, 2020
7b72c1e
Update benchmark/benchmark-sysbench-v4-vs-v3.md
lilin90 May 26, 2020
471562b
Update v4.0-performance-benchmarking-with-tpcc.md
scsldb May 26, 2020
8c7ab5d
Update benchmark/v4.0-performance-benchmarking-with-tpcc.md
lilin90 May 27, 2020
23333e7
Update benchmark/v4.0-performance-benchmarking-with-tpcc.md
lilin90 May 27, 2020
49eb573
Update tidb-limitations.md
lilin90 May 27, 2020
423303b
Merge branch 'docs-special-week' into docs-speical-week-overview
sre-bot May 27, 2020
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 TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
+ [TiDB 简介](/overview.md)
+ [开源信息说明](/licensing.md)
+ [核心用户列表](/adopters.md)
+ [核心特性](/key-features.md) @段兵
+ [核心特性](/basic-features.md) @段兵
+ 数据类型
+ SQL 与功能
+ 安全性
Expand Down
88 changes: 88 additions & 0 deletions basic-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: TiDB 基本功能
category: introduction
---

# TiDB 基本功能

本文详细介绍 TiDB 具备的基本功能。

## 数据类型

- 数值类型: BIT、BOOL|BOOLEAN、SMALLINT、MEDIUMINT、INT|INTEGER、BIGINT、FLOAT、DOUBLE、DECIMAL。

- 日期和时间类型: DATE、TIME、DATETIME、TIMESTAMP、YEAR。

- 字符串类型: CHAR、VARCHAR、TEXT、TINYTEXT、MEDIUMTEXT、LONGTEXT、BINARY、VARBINARY、BLOB、TINYBLOB、MEDIUMBLOB、LONGBLOB、ENUM、SET。

- JSON 类型。

## 运算符

- 算术运符、位运算符、比较运算符、逻辑运算符、日期和时间运算符等。

## 字符集及排序规则

- 字符集:UTF8、UTF8MB4、BINARY、ASCII、LATIN1。

- 排序规则:UTF8MB4_GENERAL_CI、UTF8MB4_GENERAL_BIN、UTF8_GENERAL_CI、UTF8_GENERAL_BIN、BINARY。

## 函数

- 控制流函数、字符串函数、日期和时间函数、位函数、数据类型转换函数、数据加解密函数、压缩和解压函数、信息函数、JSON 函数、聚合函数、窗口函数、信息函数等。

## SQL 语句

- 完全支持标准的 Data Definition Statements 语句,例如:CREATE、DROP、ALTER、RENAME、RUNCATE 等。

- 完全支持标准的 Data Manipulation Statements 语名,例如:INSERT、REPLACE、SELECT、Subqueries、UPDATE、LOAD DATA 等。

- 完全支持标准的 Transactional and Locking Statements 语名,例如:START TRANSACTION、COMMIT、ROLLBACK、SET TRANSACTION 等。

- 完全支持标准的 Database Administration Statements 语名,例如:SHOW、SET 等。

- 完全支持标准的 Utility Statements语句, 例如:DESCRIBE、EXPLAIN、USE 等。

- 完全支持 SQL GROUP BY 和 ORDER BY 子语句。

- 完全支持标准 SQL 语法的 LEFT OUTER JOIN 和 RIGHT OUTER JOIN。

- 完全支持标准 SQL 要求的表和列别名。

## 分区表

- 支持 Range 分区。

- 支持 Hash 分区。

## 视图

- 支持普通视图。

## 约束

- 支持非空约束。

- 支持主键约束。

- 支持唯一约束。

## 安全

- 支持基于 RBAC 的权限管理。

- 支持密码管理。

- 支持通信、数据加密。

- 支持 IP 白名单。

- 支持审记功能。

## 工具

- 支持快速备份功能

- 支持通过工具从 MySQL 迁移数据到 TiDB。

- 支持通过工具部署、运维 TiDB。
138 changes: 138 additions & 0 deletions benchmark/benchmark-sysbench-v4-vs-v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
title: TiDB Sysbench 性能对比测试报告 - v4.0 对比 v3.0
category: benchmark
draft: true
---

# TiDB Sysbench 性能对比测试报告 - v4.0 对比 v3.0

## 测试目的

测试对比 TiDB v4.0 和 v3.0 在 OLTP 场景下的性能。

## 测试环境 (AWS EC2)

### 硬件配置

| 服务类型 | EC2 类型 | 节点数 |
|:----------|:----------|:----------|
| PD | m5.xlarge | 3 |
| TiKV | i3.4xlarge| 3 |
| TiDB | c5.4xlarge| 3 |
| Sysbench | m5.4xlarge| 1 |

### 软件版本

| 服务类型 | 软件版本
|:----------|:-----------|
| PD | 3.0、4.0 |
| TiDB | 3.0、4.0 |
| TiKV | 3.0、4.0 |
| Sysbench | 1.0.20 |

### 参数配置

#### TiDB 3.0 参数配置

- log.level: “error”
- performance.max-procs: 20
- prepared-plan-cache.enabled: true
- tikv-client.max-batch-wait-time: 2000000

#### TiKV 3.0 参数配置

- storage.scheduler-worker-pool-size: 5
- raftstore.store-pool-size: 3
- raftstore.apply-pool-size: 3
- rocksdb.max-background-jobs: 3
- raftdb.max-background-jobs: 3
- raftdb.allow-concurrent-memtable-write: true
- server.grpc-concurrency: 6
- readpool.storage.normal-concurrency: 10
- readpool.coprocessor.normal-concurrency: 5

#### TiDB 4.0 参数配置

- log.level: “error”
- performance.max-procs: 20
- prepared-plan-cache.enabled: true
- tikv-client.max-batch-wait-time: 2000000

#### TiKV 4.0 参数配置

- storage.scheduler-worker-pool-size: 5
- raftstore.store-pool-size: 3
- raftstore.apply-pool-size: 3
- rocksdb.max-background-jobs: 3
- raftdb.max-background-jobs: 3
- raftdb.allow-concurrent-memtable-write: true
- server.request-batch-enable-cross-command: false
- server.grpc-concurrency: 6
- readpool.unifiy-read-pool: true
- readpool.unified.min-thread-count: 5
- readpool.unified.max-thread-count: 20
- readpool.storage.normal-concurrency: 10
- pessimistic-txn.pipelined: true

#### 全局变量

- set global tidb_hashagg_final_concurrency=1;
- set global tidb_hashagg_partial_concurrency=1;
- set global tidb_disable_txn_auto_retry=0;

## 测试方案

- 通过 TiUP 部署 TiDB v4.0 和 v3.0。
- 通过 Sysbench 导入 16 张表,每张表数据 1000 万数据。
- 分别对每个表执行 `analyze table` 命令。
- 备份数据用于不同并发测试前进行恢复以保证每次数据一致。
- 启动 Sysbench 客户端,测试 point_select, read_write,update_index, update_non_index,通过 aws nlb 向 TIDB 加压,单次预热 1 分钟,测试 5 分钟。
- 每轮完成后停止集群,使用之前的备份的数据覆盖,再启动集群。

### 准备数据命令

sysbench oltp_common \
--threads=16 \
--rand-type=uniform \
--db-driver=mysql \
--mysql-db=sbtest \
--mysql-host=$aws_nlb_host \
--mysql-port=$aws_nlb_port \
--mysql-user=root \
--mysql-password=password \
prepare --tables=16 --table-size=10000000

### 执行测试命令

sysbench $testname \
--threads=$threads \
--time=300 \
--report-interval=1 \
--rand-type=uniform \
--db-driver=mysql \
--mysql-db=sbtest \
--mysql-host=$aws_nlb_host \
--mysql-port=$aws_nlb_port \
run --tables=16 --table-size=10000000

## 测试结果

### Point Select

TODO
<!-- TODO ![Point Select](/media/sysbench_v4vsv3_point_select.png) -->

### Update Non-index

TODO
<!-- TODO ![Update Non-index](/media/sysbench_v4vsv3_update_non_index.png)-->

### Update Index

TODO
<!-- TODO ![Update Index](/media/sysbench_v4vsv3_update_index.png)-->

### Read Write

TODO
<!-- ![Read Write](/media/sysbench_v4vsv3_read_write.png)-->
Loading