提交 8a515490 编写于 作者: M Mars Liu

upgrade to performance

上级 4b9bba94
......@@ -43,5 +43,5 @@ select dept, min(salary) from employee;
### D
```mysql
select sum(total) from orders having deal and unit_price > 1000;
select dept, min(total) from employee;
```
\ No newline at end of file
{
"type": "code_options",
"author": "ccat",
"source": "avg.md",
"notebook_enable": false,
"exercise_id": "c6ff6b73f6844327b71b6b0630fedcaa"
}
\ No newline at end of file
# 平均值练习
Joe 想要得到 employee 表
```mysql
create table employee
(
id serial primary key,
name varchar(256),
dept varchar(256),
salary decimal(12, 4)
);
```
中每个部门的平均工资信息,这条查询应该怎么写?
## 答案
```mysql
select dept, avg(salary) from employee group by dept;
```
## 选项
### A
```mysql
select dept, avg(salary) from employee;
```
### B
```mysql
select dept, avg(salary) from employee;
```
### C
```mysql
select dept, avg(salary) from employee;
```
### D
```mysql
select dept, avg(salary) from employee ;
```
\ No newline at end of file
......@@ -2,11 +2,10 @@
"node_id": "mysql-11462fccf9d24d17a372d5c60af90f54",
"keywords": [],
"children": [],
"export": [],
"keywords_must": [
["mysql", "平均值"],
["mysql", "avg"]
"export": [
"avg.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
{
"node_id": "mysql-769c096b229842239e2ba2f8d1c768d3",
"keywords": ["连接复用", "连接池"],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
{
"node_id": "mysql-d7b339f2b2434e3fbd3721b7cd1abc1a",
"keywords": ["performance", "application", "io"],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
{
"node_id": "mysql-8973ee6a0cb045b7bcf623b4e5757baa",
"keywords": [],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
{
"node_id": "mysql-7f86d4e58a514a44bce09a19595f9cab",
"keywords": [],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
{
"node_id": "mysql-402ec368b74f4c33b33c812e9f762d3a",
"keywords": [],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
{
"node_id": "mysql-288d4606c1ae4f49a0ab79212bc0ff2b",
"keywords": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
}
\ No newline at end of file
......@@ -2,7 +2,9 @@
"node_id": "mysql-3e4c837b471c454c90bfbc32445f2780",
"keywords": [],
"children": [],
"export": [],
"export": [
"slack.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
......
{
"type": "code_options",
"author": "ccat",
"source": "slack.md",
"notebook_enable": false,
"exercise_id": "d62e33f550494f849f87b62acdcf9d0a"
}
\ No newline at end of file
# 反范式设计
反范式优化的主要动机和思路是:
1. 通过适当增加冗余字段,减少连接查询的次数和复杂度
2. 对于经常发生的聚合计算,如果对实时正确性要求不高,可以缓存中间结果,减少实时的聚合计算压力
3. 用适度的写冗余,换取读操作的大幅优化
4. 适当的放宽索引,可以优化局限于少数字段的查询性能
## 答案
全部都是
## 选项
### A
全部都不对
### B
```
1, 2, 3
```
### C
```
2, 3, 4
```
### D
```
2, 3
```
### E
```
3, 4
```
\ No newline at end of file
{
"node_id": "mysql-06bc5338054a40fc90b24333ee2b9125",
"keywords": [],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
{
"node_id": "mysql-fbcc654d6a86452aa349d2ed6003adb6",
"keywords": [],
"keywords": ["show profile"],
"children": [],
"export": [],
"keywords_must": [],
......
{
"type": "code_options",
"author": null,
"source": "bulk_insert.md",
"notebook_enable": false,
"exercise_id": "936ee1ecbd4a4b9aa795fa537e24f659"
}
\ No newline at end of file
# 批量写入
Joe 需要为数据组准备一个离线数据库,这个数据库的数据量很大。
下面这些措施中有哪些可以帮助 Joe 更快的写入这些数据?
1. 使用`ALTER TABLE t_table_name DISABLE KEYS;`禁用索引,完成工作后用`ALTER TABLE t_table_name ENABLE KEYS;`启用索引
2. 使用`SET UNIQUE_CHECKS = 0;`禁用唯一性检查,完成工作后用`SET UNIQUE_CHECKS = 1;`恢复唯一性检查
3. 使用`SET foreign_key_checks = 0;`禁用外键检查,完成工作后`SET foreign_key_checks = 1;`恢复外键检查
4. 使用`insert values(...),(...),(...)...`批量插入数据
5. 使用`LOAD DATA INFILE ‘data_file_path’ INTO TABLE table_name;`批量导入数据
6. 对 InnoDB 表使用 `SET autocommit = 0;` 禁用自动事务,完成工作后用 `SET autocommit = 1;`
## 答案
全部都对
## 选项
### A
```
1, 2, 3, 4, 5
```
### B
```
2, 3, 4, 5
```
### C
```
2, 3, 4, 6
```
### D
```
1, 2, 3, 4
```
### D
```
3, 4, 5, 6
```
### E
```
3, 4
```
\ No newline at end of file
......@@ -2,7 +2,9 @@
"node_id": "mysql-4e93793f51a24f0eb00f7824ecc8929b",
"keywords": [],
"children": [],
"export": [],
"export": [
"bulk_insert.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
......
{
"node_id": "mysql-ff4222264013437da2214ff77ca92961",
"keywords": [],
"keywords": ["delete", "performance", "优化", "删除"],
"children": [],
"export": [],
"export": [
"performance_delete.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
......
{
"type": "code_options",
"author": null,
"source": "performance_delete.md",
"notebook_enable": false,
"exercise_id": "105bda06ce03418aaad1422b61767cb6"
}
\ No newline at end of file
# 快速删除
Joe 需要删除数据分析库中 orders 表的数据,orders按时间分区,因为是分析部门离线使用,不需要考虑并发,下列哪些操作可以更快的删除这些数据?
1. 使用 `truncate from orders`;
2. 可以执行 `ALTER TABLE orders DROP PARTITION partition_name;` 删除指定分区
3. 去掉唯一约束然后 `delete from orders where 1=1`
4. 使用可写游标,一次一万行滚动删除
5. `drop table orders` 删除后重建
## 答案
```
1, 2, 5
```
## 选项
### A
全部选项都可以
### B
```
1, 2, 3, 4
```
### C
```
3, 4
```
### D
```
2, 3
```
### E
```
2, 3, 4
```
\ No newline at end of file
{
"node_id": "mysql-f2a76883814745b9979541ed4117754f",
"keywords": [],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
......@@ -2,7 +2,9 @@
"node_id": "mysql-6d4f4d7aecfb4546a8163256859562e1",
"keywords": [],
"children": [],
"export": [],
"export": [
"configuration.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
......
{
"type": "code_options",
"author": null,
"source": "configuration.md",
"notebook_enable": false,
"exercise_id": "b90270843de54822a1556cb47ca49394"
}
\ No newline at end of file
# 配置项优化
Joe 要帮助开发部优化交易数据库的性能,下面哪些优化是可能有帮助的?
1. 适当增大MySQL的最大连接数 max_connections, 提高并发响应能力。
2. 适当增大 table_cache,提高同时打开表的个数。此参数需根据业务需要有节制的上调
3. 适当增大 table_open_cache,提高数据表的缓存数量。
4. 适当调整 innodb_buffer_pool_size:此配置项决定着InnoDB存储引擎的数据表的数据和索引数据的最大缓冲区大小。一般可以分配80%的物理内存。
5. 适当增加 innodb_log_buffer_size,减少频繁的日志写操作。
6. 如果存在较多的排序操作,调整 sort_buffer_size:排序缓冲区的大小。
7. read_buffer_size:数据表的读缓冲区。适当增加此配置项的值,能够提高MySQL的并发读能力。
8. back_log:如果MySQL服务器需要在短时间内处理大量的连接请求,则可以适当增大此配置项的值。
9. thread_cache_size:MySQL缓存的数据库服务线程的最大线程数。当有大量客户端连接MySQL时,可以适当增大此配置项的值。
10. innodb_lock_wait_timeout:InnoDB存储引擎等待行锁的时间,默认值为50ms。对于实时要求高的应用,可以将此配置项的值适当调小。
## 答案
全部都是
## 选项
### A
```
1, 2, 3, 4, 5
```
### B
```
1, 2, 3, 4, 5, 6, 7, 8
```
### C
```
1, 2, 3, 4, 5, 6, 7, 8
```
### D
```
4, 5, 6, 7, 8
```
{
"node_id": "mysql-36d638345c1949f7bb032baf8d9f996e",
"keywords": [],
"keywords": [
"performance",
"performance schema",
"优化"
],
"children": [],
"export": [],
"export": [
"performance_schema.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
......
{
"type": "code_options",
"author": null,
"source": "performance_delete.md",
"notebook_enable": false,
"exercise_id": "cea8e3db523b4f1fb9a502e1d9c27d7b"
}
\ No newline at end of file
# # Performance Schema
Joe 为交易库开启了 Performance Schema 配置。那么对于交易数据库的优化,哪些是他应该关注的?
1.`performance_schema.events_waits_current` 活跃线程的执行操作
2.`performance_schema.file_summary_by_event_name` 获取被频繁使用的文件,特别是经常需要等待的文件
3.`performance.events_statements_summary_by_diges` 获取 MySQL 的统计信息
## 答案
所有都是。
## 选项
### A
所有都不是,performance_schema 中不包含这些信息,它们来自 Sys 数据库。
### B
```
1, 2
```
### C
```
2, 3
```
\ No newline at end of file
{
"node_id": "mysql-4a1bb52626b04dabac78af8eafea868e",
"keywords": [],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
......@@ -2,7 +2,9 @@
"node_id": "mysql-3d5c8647b1674de18c8348454d16fee5",
"keywords": [],
"children": [],
"export": [],
"export": [
"sys.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
......
{
"type": "code_options",
"author": null,
"source": "sys.md",
"notebook_enable": false,
"exercise_id": "ed53fabf084c4ceb99952f5196412b49"
}
\ No newline at end of file
# Sys 数据库
Joe 计划从交易数据库服务器的 sys 系统库获取一些优化线索,下列哪些操作是他需要关注的?
1. 通过 `SELECT * FROM sys.schema_unused_indexes` 找到未使用的索引
2. 通过 `SELECT * FROM sys.schema_redundant_indexes` 找到冗余索引
3. 通过 `SELECT * FROM sys.user_summary` 观察每用户资源消耗
4. 通过 `SELECT * FROM sys.host_summary` 观察每连接消耗
提示:交易数据库仅由DBA和应用程序连接,应用程序使用大量相同配置和登录信息的连接访
问数据库,交易系统访问数据库时,希望尽可能的快速、高并发、每个查询的时间尽可能短。
## 答案
```
1, 2, 4
```
## 选项
### A
所有都是
### B
```
3
```
### C
```
1, 3, 4
```
### C
```
2, 3, 4
```
\ No newline at end of file
{
"node_id": "mysql-715cc1f656df4b099d952145a53dd006",
"keywords": [],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
......@@ -23,12 +23,7 @@
"node_id": "mysql-8e971f3c569a4e56bb83b5d75a2a425f",
"keywords": [],
"children": [],
"keywords_must": [
[
"数据库",
"概念"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -38,20 +33,20 @@
"node_id": "mysql-925f9d57c7794e5391fb790bcdbf43c6",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"概念"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
}
],
"keywords_must": [],
"keywords_must": [
"关系型数据库",
"database",
"relational",
"rdbms"
],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -68,10 +63,7 @@
],
"children": [],
"keywords_must": [
[
"mysql",
"安装"
]
"安装"
],
"keywords_forbid": [],
"group": 1
......@@ -87,10 +79,7 @@
],
"children": [],
"keywords_must": [
[
"mysql",
"登录"
]
"登录"
],
"keywords_forbid": [],
"group": 1
......@@ -99,7 +88,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -117,18 +106,7 @@
"删除数据库"
],
"children": [],
"keywords_must": [
[
"mysql",
"数据库",
"创建"
],
[
"mysql",
"数据库",
"删除"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -138,13 +116,7 @@
"node_id": "mysql-426b0b1e04a4462e984ee77ca536f916",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"创建",
"表"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -154,12 +126,7 @@
"node_id": "mysql-401a4084d56c4123afa3ced3aa0e5e98",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"编码"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -172,12 +139,7 @@
"存储引擎"
],
"children": [],
"keywords_must": [
[
"mysql",
"存储引擎"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -185,7 +147,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -198,12 +160,7 @@
"node_id": "mysql-1418d1a710ab4e7c8cacb0bad047179e",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"数值类型"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -213,16 +170,7 @@
"node_id": "mysql-7256fe88bcf241d486c9e2e254ef66d9",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"日期类型"
],
[
"mysql",
"时间类型"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -238,13 +186,7 @@
"文本"
],
"children": [],
"keywords_must": [
[
"mysql",
"文本",
"字符串"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -258,13 +200,7 @@
"二进制"
],
"children": [],
"keywords_must": [
[
"mysql",
"二进制",
"字符串"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -272,7 +208,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -285,12 +221,7 @@
"node_id": "mysql-fcca525ab0f04f16834ded9b2b3f38a4",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"插入"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -300,12 +231,7 @@
"node_id": "mysql-2eb9e9d351e848f580b70cf9e7b93280",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"修改"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -315,12 +241,7 @@
"node_id": "mysql-3cae643e21644d6d937d69b59014922f",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"删除"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -328,7 +249,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -344,12 +265,7 @@
"select"
],
"children": [],
"keywords_must": [
[
"mysql",
"select"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -359,12 +275,7 @@
"node_id": "mysql-91cc9c73e58945d3ba654370a057a1c7",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"where"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -377,12 +288,7 @@
"运算符"
],
"children": [],
"keywords_must": [
[
"mysql",
"运算符"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -392,12 +298,7 @@
"node_id": "mysql-07b85d4c87c84a62a9b55299250cd9a3",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"函数"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -405,7 +306,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -421,12 +322,7 @@
"mysql"
],
"children": [],
"keywords_must": [
[
"mysql",
"命令行"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -439,9 +335,7 @@
"shell"
],
"children": [],
"keywords_must": [
"mysqladmin"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
}
......@@ -455,9 +349,7 @@
"pack"
],
"children": [],
"keywords_must": [
"myisampack"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
}
......@@ -471,9 +363,7 @@
"二进制日志"
],
"children": [],
"keywords_must": [
"mysqlbinlog"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
}
......@@ -483,9 +373,7 @@
"node_id": "mysql-a4998d140f024982989ed4647c78ba65",
"keywords": [],
"children": [],
"keywords_must": [
"mysqldump"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -495,9 +383,7 @@
"node_id": "mysql-d9cdafd993bf41bbb860e5087dd54bd1",
"keywords": [],
"children": [],
"keywords_must": [
"mysqlcheck"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
}
......@@ -507,9 +393,7 @@
"node_id": "mysql-430b0de67c294d64aff35c85fec8393e",
"keywords": [],
"children": [],
"keywords_must": [
"mysqlshow"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
}
......@@ -519,9 +403,7 @@
"node_id": "mysql-c5b92946b8824ceea97b20f26946bb76",
"keywords": [],
"children": [],
"keywords_must": [
"mysqlpump"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
}
......@@ -536,9 +418,7 @@
"导入"
],
"children": [],
"keywords_must": [
"mysqlimport"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -546,7 +426,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
}
],
......@@ -579,14 +459,13 @@
],
"children": [],
"keywords_must": [
[
"mysql",
"用户"
],
[
"mysql",
"权限"
]
"role",
"login",
"user",
"用户",
"角色",
"权限",
"privilege"
],
"keywords_forbid": [],
"group": 1
......@@ -601,10 +480,8 @@
],
"children": [],
"keywords_must": [
[
"mysql",
"表"
]
"表",
"table"
],
"keywords_forbid": [],
"group": 1
......@@ -617,32 +494,21 @@
"view"
],
"children": [],
"keywords_must": [
[
"mysql",
"视图"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
},
{
"存储过程和函数": {
"node_id": "mysql-38fbee06f03c4265903345cae13996c1",
"node_id": "mysql-98e926730d844f238dc9cd8ac5f65126",
"keywords": [
"produce",
"function"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [
[
"mysql",
"存储过程",
"函数"
]
],
"keywords_forbid": [],
"group": 0
}
},
......@@ -657,11 +523,10 @@
],
"children": [],
"keywords_must": [
[
"mysql",
"索引",
"约束"
]
"索引",
" 约束",
"constraints",
"index"
],
"keywords_forbid": [],
"group": 1
......@@ -676,10 +541,8 @@
],
"children": [],
"keywords_must": [
[
"mysql",
"触发器"
]
"trigger",
"触发器"
],
"keywords_forbid": [],
"group": 1
......@@ -694,12 +557,7 @@
"myisam"
],
"children": [],
"keywords_must": [
[
"mysql",
"存储引擎"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -707,7 +565,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -723,12 +581,7 @@
"别名"
],
"children": [],
"keywords_must": [
[
"mysql",
"别名"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -738,12 +591,7 @@
"node_id": "mysql-2296dbe96d584a52bd28a3ad5f655518",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"between"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -757,12 +605,7 @@
"透视表"
],
"children": [],
"keywords_must": [
[
"mysql",
"case"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -774,12 +617,7 @@
"distinct"
],
"children": [],
"keywords_must": [
[
"mysql",
"distinct"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -789,12 +627,7 @@
"node_id": "mysql-fa20a81805b44975aed265dd058c542a",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"order by"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -806,12 +639,7 @@
"union"
],
"children": [],
"keywords_must": [
[
"mysql",
"union"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -824,12 +652,7 @@
"regular"
],
"children": [],
"keywords_must": [
[
"mysql",
"正则表达式"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -844,10 +667,9 @@
],
"children": [],
"keywords_must": [
[
"mysql",
"分页"
]
"分页",
"limit",
"offset"
],
"keywords_forbid": [],
"group": 1
......@@ -856,7 +678,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -872,16 +694,7 @@
"node_id": "mysql-ac3c072bc54749bdb82324f2b203890d",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"计数"
],
[
"mysql",
"count"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -894,16 +707,7 @@
"求和"
],
"children": [],
"keywords_must": [
[
"mysql",
"求和"
],
[
"mysql",
"sum"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -913,16 +717,7 @@
"node_id": "mysql-c1652108441c424197c0c3c526e4831c",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"最小值"
],
[
"mysql",
"min"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -932,16 +727,7 @@
"node_id": "mysql-77042376726743bea5c97e82a67a2016",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"最大值"
],
[
"mysql",
"max"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -951,16 +737,7 @@
"node_id": "mysql-11462fccf9d24d17a372d5c60af90f54",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"平均值"
],
[
"mysql",
"avg"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -970,12 +747,7 @@
"node_id": "mysql-3b85e53dd88146798d21b7254ad85cae",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"having"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -985,20 +757,19 @@
"node_id": "mysql-91829d4938034ce09e99badf23dbebf6",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"WITH ROLLUP"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
}
],
"keywords_must": [],
"keywords_must": [
"group by",
"分组",
"聚合"
],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -1014,12 +785,7 @@
"node_id": "mysql-73bfbd883511436c85130b71fa108038",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"inner join"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1029,12 +795,7 @@
"node_id": "mysql-d7a8869fb798498c839c913ce930015d",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"left join"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1044,12 +805,7 @@
"node_id": "mysql-7c2331eea3e84eef9464ad4d7c03e2de",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"right join"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1059,12 +815,7 @@
"node_id": "mysql-fd27af20b046463eac7b2712885ac018",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"cross join"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1074,12 +825,7 @@
"node_id": "mysql-a4773004e0cf432aa7ccdf6b9490838f",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"复杂连接"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -1090,7 +836,7 @@
"连接查询"
],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -1103,13 +849,7 @@
"node_id": "mysql-bf629829370d405cbfcd5aa83adb536a",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"索引",
"入门"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1119,13 +859,7 @@
"node_id": "mysql-fe65d5c615ad40f8ac056cc654f2d788",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"创建",
"索引"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1135,13 +869,7 @@
"node_id": "mysql-85ba0df78d754b00b30aa8e74ad35d06",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"删除",
"索引"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1149,7 +877,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -1165,12 +893,7 @@
"node_id": "mysql-f045eeff32bd449c83afc76abdd65344",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"相关子查询"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
}
......@@ -1184,12 +907,7 @@
"any"
],
"children": [],
"keywords_must": [
[
"mysql",
"any"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1199,12 +917,7 @@
"node_id": "mysql-87c2d9bc921643aabfd1b12b964ef557",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"all"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1214,15 +927,8 @@
"node_id": "mysql-6c6789b86f714acaa76467fdf9623191",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"exists"
]
],
"keywords_forbid": [
"not exists"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
......@@ -1231,12 +937,7 @@
"node_id": "mysql-19bc57db42bd4615ba4f123745289407",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"not exists"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1246,15 +947,8 @@
"node_id": "mysql-8436069c855c4f1ead7cf11a026e004b",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"in"
]
],
"keywords_forbid": [
"not in"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
......@@ -1263,12 +957,7 @@
"node_id": "mysql-06525286a9d4488d94e85b6bd36e3c1e",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"not in"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1281,12 +970,7 @@
"列子查询"
],
"children": [],
"keywords_must": [
[
"mysql",
"列子查询"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1297,7 +981,7 @@
"subquery"
],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -1310,13 +994,7 @@
"node_id": "mysql-95a29a6a448849029d548393bbdf283e",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"视图",
"概念"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1328,13 +1006,7 @@
"create view"
],
"children": [],
"keywords_must": [
[
"mysql",
"创建",
"视图"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1344,13 +1016,7 @@
"node_id": "mysql-3a51b0740b704d92a534335a7a8dfd6e",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"修改",
"视图"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1360,13 +1026,7 @@
"node_id": "mysql-36171582b8324dc98ff16d9b0cac406d",
"keywords": [],
"children": [],
"keywords_must": [
[
"mysql",
"删除",
"视图"
]
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
......@@ -1374,7 +1034,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 1
"group": 0
}
},
{
......@@ -1455,7 +1115,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -1496,7 +1156,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -1549,7 +1209,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -1646,7 +1306,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -1762,7 +1422,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
}
],
......@@ -1954,7 +1614,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -2024,7 +1684,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -2155,7 +1815,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -2244,7 +1904,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -2292,16 +1952,6 @@
"group": 0
}
},
{
"清理重复索引和冗余索引": {
"node_id": "mysql-06bc5338054a40fc90b24333ee2b9125",
"keywords": [],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
{
"增加中间表": {
"node_id": "mysql-a2ddae1b044149ecbb74db3b6eb32721",
......@@ -2358,7 +2008,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -2484,7 +2134,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -2603,7 +2253,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -2634,7 +2284,7 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
},
{
......@@ -2642,26 +2292,6 @@
"node_id": "mysql-3aa068fd95ea4f3bac2c5fa8d6ec0951",
"keywords": [],
"children": [
{
"硬件配置": {
"node_id": "mysql-f2a76883814745b9979541ed4117754f",
"keywords": [],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
{
"系统内核": {
"node_id": "mysql-4a1bb52626b04dabac78af8eafea868e",
"keywords": [],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
{
"配置项优化": {
"node_id": "mysql-6d4f4d7aecfb4546a8163256859562e1",
......@@ -2691,89 +2321,11 @@
"keywords_forbid": [],
"group": 0
}
},
{
"资源组": {
"node_id": "mysql-715cc1f656df4b099d952145a53dd006",
"keywords": [],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
}
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
}
},
{
"应用程序优化": {
"node_id": "mysql-288d4606c1ae4f49a0ab79212bc0ff2b",
"keywords": [],
"children": [
{
"复用数据库连接": {
"node_id": "mysql-769c096b229842239e2ba2f8d1c768d3",
"keywords": [
"连接复用",
"连接池"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
{
"减少数据访问": {
"node_id": "mysql-d7b339f2b2434e3fbd3721b7cd1abc1a",
"keywords": [
"performance",
"application",
"io"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
{
"开启查询缓存": {
"node_id": "mysql-8973ee6a0cb045b7bcf623b4e5757baa",
"keywords": [],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
{
"使用外部缓存": {
"node_id": "mysql-7f86d4e58a514a44bce09a19595f9cab",
"keywords": [],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
{
"分布式 MySQL 架构": {
"node_id": "mysql-402ec368b74f4c33b33c812e9f762d3a",
"keywords": [],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
}
],
"keywords_must": [],
"keywords_forbid": [],
"group": 2
"group": 0
}
}
],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册