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

performance_schema -> information_schema (#7147) #7172

Merged
Merged
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
4 changes: 2 additions & 2 deletions statement-summary-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Statement Summary Tables

针对 SQL 性能相关的问题,MySQL 在 `performance_schema` 提供了 [statement summary tables](https://dev.mysql.com/doc/refman/5.6/en/statement-summary-tables.html),用来监控和统计 SQL。例如其中的一张表 `events_statements_summary_by_digest`,提供了丰富的字段,包括延迟、执行次数、扫描行数、全表扫描次数等,有助于用户定位 SQL 问题。

为此,从 4.0.0-rc.1 版本开始,TiDB 在 `information_schema` 中提供与 `events_statements_summary_by_digest` 功能相似的系统表:
为此,从 4.0.0-rc.1 版本开始,TiDB 在 `information_schema`(_而不是_ `performance_schema`)中提供与 `events_statements_summary_by_digest` 功能相似的系统表:

- `statements_summary`
- `statements_summary_history`
Expand All @@ -28,7 +28,7 @@ SELECT * FROM employee WHERE id IN (1, 2, 3) AND salary BETWEEN 1000 AND 2000;
select * from EMPLOYEE where ID in (4, 5) and SALARY between 3000 and 4000;
```

规一化后都是
归一化后都是

```sql
select * from employee where id in (...) and salary between ? and ?;
Expand Down