提交 ea622de0 编写于 作者: M Mars Liu

review

上级 99f28cbb
{
"node_id": "mysql-25808aa5b4ba4e78bd3dc59e09b403ed",
"keywords": [],
"keywords": ["create user"],
"children": [],
"export": [
"create_user.json"
......
{
"node_id": "mysql-291ab4c99fa945ae8629b1956bc1ecc9",
"keywords": [],
"keywords": ["grant", "user", "role", "授权", "角色"],
"children": [],
"export": [
"grant.json",
......
{
"node_id": "mysql-d2b788a8200140a693297356c02ce872",
"keywords": [],
"keywords": ["privilege", "查看权限"],
"children": [],
"export": [
"view_privileges.json"
......
{
"node_id": "mysql-d47605d2cb134cdc98e6fbefc0651e8f",
"keywords": [
"revoke",
"撤销",
"revoke"
],
"children": [],
......
{
"node_id": "mysql-12a66fd74a2741bbbfc0df7a59801123",
"keywords": [],
"keywords": ["change password", "修改密码"],
"children": [],
"export": [
"change_password.json"
......
{
"node_id": "mysql-0bb8146d9ee54ff6934e45ce4e3b2f99",
"keywords": [],
"keywords": ["drop user", "删除用户"],
"children": [],
"export": [
"drop_user.json"
......
......@@ -2,7 +2,8 @@
"node_id": "mysql-ab80d0d8af69427ab91a65b89de7e30c",
"keywords": [
"resources",
"limit"
"limit",
"资源"
],
"children": [],
"export": [
......
{
"node_id": "mysql-ac3c072bc54749bdb82324f2b203890d",
"keywords": [],
"keywords": ["count", "计数"],
"children": [],
"export": [
"count.json"
......
{
"node_id": "mysql-c1652108441c424197c0c3c526e4831c",
"keywords": [],
"keywords": ["min", "最小值"],
"children": [],
"export": [
"min.json"
......
{
"node_id": "mysql-77042376726743bea5c97e82a67a2016",
"keywords": [],
"keywords": ["max", "最大值"],
"children": [],
"export": [
"max.json"
......
{
"node_id": "mysql-11462fccf9d24d17a372d5c60af90f54",
"keywords": [],
"keywords": ["avg", "平均值"],
"children": [],
"export": [
"avg.json"
......
{
"node_id": "mysql-f045eeff32bd449c83afc76abdd65344",
"keywords": [],
"keywords": ["相关子查询", "correlated subquery"],
"children": [],
"export": [
"subquery.json"
......
......@@ -16,5 +16,5 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
\ No newline at end of file
{
"node_id": "mysql-87c2d9bc921643aabfd1b12b964ef557",
"keywords": [],
"keywords": ["子查询", "subquery", "all"],
"children": [],
"export": [
"all.json"
......@@ -12,5 +12,5 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
\ No newline at end of file
{
"node_id": "mysql-6c6789b86f714acaa76467fdf9623191",
"keywords": [],
"keywords": ["exists"],
"children": [],
"export": [
"exists.json"
......@@ -14,5 +14,5 @@
"keywords_forbid": [
"not exists"
],
"group": 0
"group": 1
}
\ No newline at end of file
......@@ -15,5 +15,5 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
\ No newline at end of file
{
"node_id": "mysql-73bfbd883511436c85130b71fa108038",
"keywords": [],
"keywords": ["inner", "join", "连接查询"],
"children": [],
"export": [
"join_self.json"
......@@ -12,5 +12,5 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
\ No newline at end of file
{
"node_id": "mysql-d7a8869fb798498c839c913ce930015d",
"keywords": [],
"keywords": ["左连接", "left join"],
"children": [],
"export": [
"left_join.json"
......@@ -12,5 +12,5 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
\ No newline at end of file
......@@ -12,5 +12,5 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
\ No newline at end of file
{
"node_id": "mysql-fd27af20b046463eac7b2712885ac018",
"keywords": [],
"keywords": ["cross join", "交叉连接"],
"children": [],
"export": [
"cross_join.json"
......@@ -12,5 +12,5 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
\ No newline at end of file
{
"node_id": "mysql-a4773004e0cf432aa7ccdf6b9490838f",
"keywords": [],
"keywords": ["join"],
"children": [],
"export": [
"salary.json"
......@@ -9,5 +9,5 @@
["mysql", "复杂连接"]
],
"keywords_forbid": [],
"group": 1
"group": 2
}
\ No newline at end of file
......@@ -10,5 +10,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -10,5 +10,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -9,5 +9,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
{
"node_id": "mysql-e2eefb85984643f8adb95f4eee16bc8f",
"keywords": [],
"keywords": ["dump", "restore", "import", "backup", "导入", "导出"],
"children": [],
"export": [
"dump.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 1
}
\ No newline at end of file
{
"node_id": "mysql-db7153c698e8442eb5f71e8ec2f2e6cd",
"keywords": [
"unique"
"unique",
"唯一约束"
],
"children": [],
"export": [
......
{
"node_id": "mysql-391b51e398764531abf5a6e036699cc8",
"keywords": [
"equals",
"not equals",
"相等",
"不等",
"全值"
],
"children": [],
......
{
"node_id": "mysql-ce1f863b4d254d2aadb6ce2331122d16",
"keywords": [
"compose"
"compose",
"combine"
],
"children": [],
"export": [
......
{
"node_id": "mysql-d7f86bc2fcbb4b83a11f2ed73bde7ac0",
"keywords": [],
"keywords": ["if"],
"children": [],
"export": [
"if.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -10,5 +10,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -7,5 +7,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -9,5 +9,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -10,5 +10,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
{
"node_id": "mysql-d3611482eecd4055816df4b1dd9ff90d",
"keywords": [],
"keywords": ["generated"],
"keywords_must": [],
"keywords_forbid": [],
"group": 2,
......
{
"node_id": "mysql-bee8db3dd5354a42bb50277fe4cb2913",
"keywords": [],
"keywords": ["normalization"],
"children": [],
"export": [
"customer_order.json"
......
......@@ -2,7 +2,7 @@
"node_id": "mysql-3e4c837b471c454c90bfbc32445f2780",
"keywords": [
"反范式",
"anti pattern"
"anti normalization"
],
"children": [],
"export": [
......
{
"type": "code_options",
"author": "ccat",
"source": "analyze_table.md",
"notebook_enable": false,
"exercise_id": "0d6fad2784124dd5a40377efc3d6d892"
}
\ No newline at end of file
# 分析数据表
近一段时间 goods 表相关的读写很慢,Joe 想要分析以下原因,他应该做的是:
1. 导出数据库,在测试环境恢复
2. 开启查询日志,收集一天查询
3. 关闭查询日志
4. 在测试库重放查询日志
5. 执行 `analyze goods`
## 答案
```
1, 2, 3, 4, 5
```
## 选项
### A
```
5
```
### B
```
1, 5
```
### C
```
2, 3, 4, 5
```
### D
全都不对
\ No newline at end of file
{
"node_id": "mysql-cde6eae01784468fa0171ff3042f221f",
"keywords": ["analyze table", "分析数据表"],
"keywords": [
"analyze table",
"分析数据表"
],
"children": [],
"export": [],
"export": [
"analyze_table.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
......
{
"node_id": "mysql-fbcc654d6a86452aa349d2ed6003adb6",
"keywords": ["show profile"],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
{
"node_id": "mysql-f5775462ae784d44a4b2bce5f456311a",
"keywords": ["performance table", "优化数据表"],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
{
"node_id": "mysql-ccb6fcf2983b4b3e8b37abbcbc776f21",
"keywords": [],
"children": [],
"export": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
\ No newline at end of file
......@@ -7,5 +7,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -7,5 +7,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -13,5 +13,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -7,5 +7,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -11,5 +11,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -11,5 +11,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -7,5 +7,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -7,5 +7,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
{
"node_id": "mysql-6d4f4d7aecfb4546a8163256859562e1",
"keywords": [],
"keywords": ["optimize", "performance", "configuration"],
"children": [],
"export": [
"configuration.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -11,5 +11,5 @@
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
{
"node_id": "mysql-3d5c8647b1674de18c8348454d16fee5",
"keywords": [],
"keywords": ["sys", "performance"],
"children": [],
"export": [
"sys.json"
],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
\ No newline at end of file
......@@ -984,7 +984,10 @@
{
" 计数": {
"node_id": "mysql-ac3c072bc54749bdb82324f2b203890d",
"keywords": [],
"keywords": [
"count",
"计数"
],
"children": [],
"keywords_must": [
[
......@@ -1025,7 +1028,10 @@
{
"最小值": {
"node_id": "mysql-c1652108441c424197c0c3c526e4831c",
"keywords": [],
"keywords": [
"min",
"最小值"
],
"children": [],
"keywords_must": [
[
......@@ -1044,7 +1050,10 @@
{
" 最大值": {
"node_id": "mysql-77042376726743bea5c97e82a67a2016",
"keywords": [],
"keywords": [
"max",
"最大值"
],
"children": [],
"keywords_must": [
[
......@@ -1063,7 +1072,10 @@
{
" 平均值": {
"node_id": "mysql-11462fccf9d24d17a372d5c60af90f54",
"keywords": [],
"keywords": [
"avg",
"平均值"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
......@@ -1102,7 +1114,10 @@
{
"相关子查询": {
"node_id": "mysql-f045eeff32bd449c83afc76abdd65344",
"keywords": [],
"keywords": [
"相关子查询",
"correlated subquery"
],
"children": [],
"keywords_must": [
[
......@@ -1130,13 +1145,17 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
},
{
"ALL": {
"node_id": "mysql-87c2d9bc921643aabfd1b12b964ef557",
"keywords": [],
"keywords": [
"子查询",
"subquery",
"all"
],
"children": [],
"keywords_must": [
[
......@@ -1145,13 +1164,15 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
},
{
"EXISTS": {
"node_id": "mysql-6c6789b86f714acaa76467fdf9623191",
"keywords": [],
"keywords": [
"exists"
],
"children": [],
"keywords_must": [
[
......@@ -1162,7 +1183,7 @@
"keywords_forbid": [
"not exists"
],
"group": 0
"group": 1
}
},
{
......@@ -1201,7 +1222,7 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
}
],
......@@ -1224,7 +1245,11 @@
{
"INNER JOIN": {
"node_id": "mysql-73bfbd883511436c85130b71fa108038",
"keywords": [],
"keywords": [
"inner",
"join",
"连接查询"
],
"children": [],
"keywords_must": [
[
......@@ -1233,13 +1258,16 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
},
{
" LEFT JOIN": {
"node_id": "mysql-d7a8869fb798498c839c913ce930015d",
"keywords": [],
"keywords": [
"左连接",
"left join"
],
"children": [],
"keywords_must": [
[
......@@ -1248,7 +1276,7 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
},
{
......@@ -1266,13 +1294,16 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
},
{
" CROSS JOIN": {
"node_id": "mysql-fd27af20b046463eac7b2712885ac018",
"keywords": [],
"keywords": [
"cross join",
"交叉连接"
],
"children": [],
"keywords_must": [
[
......@@ -1281,13 +1312,15 @@
]
],
"keywords_forbid": [],
"group": 0
"group": 1
}
},
{
" 复杂连接": {
"node_id": "mysql-a4773004e0cf432aa7ccdf6b9490838f",
"keywords": [],
"keywords": [
"join"
],
"children": [],
"keywords_must": [
[
......@@ -1296,7 +1329,7 @@
]
],
"keywords_forbid": [],
"group": 1
"group": 2
}
}
],
......@@ -1391,7 +1424,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -1404,7 +1437,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -1429,7 +1462,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
}
],
......@@ -1446,11 +1479,18 @@
{
"数据导入和导出": {
"node_id": "mysql-e2eefb85984643f8adb95f4eee16bc8f",
"keywords": [],
"keywords": [
"dump",
"restore",
"import",
"backup",
"导入",
"导出"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 1
}
},
{
......@@ -1479,7 +1519,9 @@
{
"创建普通用户": {
"node_id": "mysql-25808aa5b4ba4e78bd3dc59e09b403ed",
"keywords": [],
"keywords": [
"create user"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
......@@ -1489,7 +1531,13 @@
{
"为用户授权": {
"node_id": "mysql-291ab4c99fa945ae8629b1956bc1ecc9",
"keywords": [],
"keywords": [
"grant",
"user",
"role",
"授权",
"角色"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
......@@ -1499,7 +1547,10 @@
{
"查看用户权限": {
"node_id": "mysql-d2b788a8200140a693297356c02ce872",
"keywords": [],
"keywords": [
"privilege",
"查看权限"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
......@@ -1510,6 +1561,8 @@
"撤销用户权限": {
"node_id": "mysql-d47605d2cb134cdc98e6fbefc0651e8f",
"keywords": [
"revoke",
"撤销",
"revoke"
],
"children": [],
......@@ -1521,7 +1574,10 @@
{
"修改用户密码": {
"node_id": "mysql-12a66fd74a2741bbbfc0df7a59801123",
"keywords": [],
"keywords": [
"change password",
"修改密码"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
......@@ -1531,7 +1587,10 @@
{
"删除用户": {
"node_id": "mysql-0bb8146d9ee54ff6934e45ce4e3b2f99",
"keywords": [],
"keywords": [
"drop user",
"删除用户"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
......@@ -1543,7 +1602,8 @@
"node_id": "mysql-ab80d0d8af69427ab91a65b89de7e30c",
"keywords": [
"resources",
"limit"
"limit",
"资源"
],
"children": [],
"keywords_must": [],
......@@ -1577,7 +1637,8 @@
"唯一索引": {
"node_id": "mysql-db7153c698e8442eb5f71e8ec2f2e6cd",
"keywords": [
"unique"
"unique",
"唯一约束"
],
"children": [],
"keywords_must": [],
......@@ -1589,10 +1650,6 @@
"全值匹配": {
"node_id": "mysql-391b51e398764531abf5a6e036699cc8",
"keywords": [
"equals",
"not equals",
"相等",
"不等",
"全值"
],
"children": [],
......@@ -1619,7 +1676,8 @@
"组合索引": {
"node_id": "mysql-ce1f863b4d254d2aadb6ce2331122d16",
"keywords": [
"compose"
"compose",
"combine"
],
"children": [],
"keywords_must": [],
......@@ -1815,11 +1873,13 @@
{
"IF": {
"node_id": "mysql-d7f86bc2fcbb4b83a11f2ed73bde7ac0",
"keywords": [],
"keywords": [
"if"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -1832,7 +1892,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -1845,7 +1905,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -1857,7 +1917,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -1870,7 +1930,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
}
],
......@@ -1887,7 +1947,9 @@
{
"生成列": {
"node_id": "mysql-d3611482eecd4055816df4b1dd9ff90d",
"keywords": [],
"keywords": [
"generated"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
......@@ -1897,7 +1959,9 @@
{
" 范式设计": {
"node_id": "mysql-bee8db3dd5354a42bb50277fe4cb2913",
"keywords": [],
"keywords": [
"normalization"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
......@@ -1909,7 +1973,7 @@
"node_id": "mysql-3e4c837b471c454c90bfbc32445f2780",
"keywords": [
"反范式",
"anti pattern"
"anti normalization"
],
"children": [],
"keywords_must": [],
......@@ -1942,41 +2006,6 @@
"keywords_forbid": [],
"group": 0
}
},
{
"检查数据表": {
"node_id": "mysql-fbcc654d6a86452aa349d2ed6003adb6",
"keywords": [
"show profile"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
{
"优化数据表": {
"node_id": "mysql-f5775462ae784d44a4b2bce5f456311a",
"keywords": [
"performance table",
"优化数据表"
],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
},
{
"拆分数据表": {
"node_id": "mysql-ccb6fcf2983b4b3e8b37abbcbc776f21",
"keywords": [],
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
}
}
],
"keywords_must": [],
......@@ -2015,7 +2044,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -2031,7 +2060,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -2047,7 +2076,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -2061,7 +2090,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -2075,7 +2104,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -2089,7 +2118,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
}
],
......@@ -2158,7 +2187,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -2173,7 +2202,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
}
],
......@@ -2194,7 +2223,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -2208,7 +2237,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
},
{
......@@ -2218,7 +2247,7 @@
"children": [],
"keywords_must": [],
"keywords_forbid": [],
"group": 0
"group": 2
}
}
],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册