# The MySQL sys schema
A collection of views, functions and procedures to help MySQL administrators get insight in to MySQL Database usage.
There are install files available for 5.6 and 5.7 respectively. To load these, you must position yourself within the directory that you downloaded to, as these top level files SOURCE individual files that are shared across versions in most cases (though not all).
## Installation
The objects should all be created as the root user (but run with the privileges of the invoker).
For instance if you download to /tmp/mysql-sys/, and want to install the 5.6 version you should:
cd /tmp/mysql-sys/
mysql -u root -p < ./sys_56.sql
Or if you would like to log in to the client, and install the 5.7 version:
cd /tmp/mysql-sys/
mysql -u root -p
SOURCE ./sys_57.sql
Alternatively, you could just choose to load individual files based on your needs, but beware, certain objects have dependencies on other objects. You will need to ensure that these are also loaded.
## Overview of objects
### Views
Many of the views in the sys schema have both a command line user friendly format output, as well as tooling friendly versions of any view that contains formatted output duplicated as an x$ table.
The examples below show output for only the formatted views, and note where there is an x$ counterpart available.
#### innodb_buffer_stats_by_schema / x$innodb_buffer_stats_by_schema
##### Description
Summarizes the output of the INFORMATION_SCHEMA.INNODB_BUFFER_PAGE table, aggregating by schema.
##### Example
```SQL
mysql> select * from innodb_buffer_stats_by_schema;
+--------------------------+------------+------------+-------+--------------+-----------+-------------+
| object_schema | allocated | data | pages | pages_hashed | pages_old | rows_cached |
+--------------------------+------------+------------+-------+--------------+-----------+-------------+
| mem30_trunk__instruments | 1.69 MiB | 510.03 KiB | 108 | 108 | 108 | 3885 |
| InnoDB System | 688.00 KiB | 351.62 KiB | 43 | 43 | 43 | 862 |
| mem30_trunk__events | 80.00 KiB | 21.61 KiB | 5 | 5 | 5 | 229 |
+--------------------------+------------+------------+-------+--------------+-----------+-------------+
```
#### innodb_buffer_stats_by_table / x$innodb_buffer_stats_by_table
##### Description
Summarizes the output of the INFORMATION_SCHEMA.INNODB_BUFFER_PAGE table, aggregating by schema and table name.
##### Example
```SQL
mysql> select * from innodb_buffer_stats_by_table;
+--------------------------+------------------------------------+------------+-----------+-------+--------------+-----------+-------------+
| object_schema | object_name | allocated | data | pages | pages_hashed | pages_old | rows_cached |
+--------------------------+------------------------------------+------------+-----------+-------+--------------+-----------+-------------+
| InnoDB System | SYS_COLUMNS | 128.00 KiB | 98.97 KiB | 8 | 8 | 8 | 1532 |
| InnoDB System | SYS_FOREIGN | 128.00 KiB | 55.48 KiB | 8 | 8 | 8 | 172 |
| InnoDB System | SYS_TABLES | 128.00 KiB | 56.18 KiB | 8 | 8 | 8 | 365 |
| InnoDB System | SYS_INDEXES | 112.00 KiB | 76.16 KiB | 7 | 7 | 7 | 1046 |
| mem30_trunk__instruments | agentlatencytime | 96.00 KiB | 28.83 KiB | 6 | 6 | 6 | 252 |
| mem30_trunk__instruments | binlogspaceusagedata | 96.00 KiB | 22.54 KiB | 6 | 6 | 6 | 196 |
| mem30_trunk__instruments | connectionsdata | 96.00 KiB | 36.68 KiB | 6 | 6 | 6 | 276 |
| mem30_trunk__instruments | connectionsmaxdata | 96.00 KiB | 31.88 KiB | 6 | 6 | 6 | 271 |
| mem30_trunk__instruments | cpuaverage | 96.00 KiB | 14.32 KiB | 6 | 6 | 6 | 55 |
| mem30_trunk__instruments | diskiototaldata | 96.00 KiB | 42.71 KiB | 6 | 6 | 6 | 152 |
| mem30_trunk__instruments | innodbopenfilesdata | 96.00 KiB | 32.61 KiB | 6 | 6 | 6 | 266 |
| mem30_trunk__instruments | innodbrowlocktimestatisticsdata | 96.00 KiB | 32.16 KiB | 6 | 6 | 6 | 261 |
| mem30_trunk__instruments | myisamkeybufferusagedata | 96.00 KiB | 25.99 KiB | 6 | 6 | 6 | 232 |
| mem30_trunk__instruments | mysqlprocessactivity | 96.00 KiB | 31.99 KiB | 6 | 6 | 6 | 252 |
| mem30_trunk__instruments | querycacheaveragefreeblocksizedata | 96.00 KiB | 27.00 KiB | 6 | 6 | 6 | 237 |
| mem30_trunk__instruments | querycacheaveragequerysizedata | 96.00 KiB | 38.29 KiB | 6 | 6 | 6 | 315 |
| mem30_trunk__instruments | querycachefragmentationdata | 96.00 KiB | 27.00 KiB | 6 | 6 | 6 | 237 |
| mem30_trunk__instruments | querycachememorydata | 96.00 KiB | 32.58 KiB | 6 | 6 | 6 | 278 |
| mem30_trunk__instruments | querycachequeriesincachedata | 96.00 KiB | 27.15 KiB | 6 | 6 | 6 | 238 |
| mem30_trunk__instruments | ramusagedata | 96.00 KiB | 15.02 KiB | 6 | 6 | 6 | 59 |
| mem30_trunk__instruments | slaverelaylogspaceusagedata | 96.00 KiB | 28.28 KiB | 6 | 6 | 6 | 249 |
| mem30_trunk__instruments | swapusagedata | 96.00 KiB | 15.02 KiB | 6 | 6 | 6 | 59 |
| InnoDB System | SYS_FIELDS | 80.00 KiB | 49.78 KiB | 5 | 5 | 5 | 1147 |
| InnoDB System | SYS_DATAFILES | 32.00 KiB | 3.97 KiB | 2 | 2 | 2 | 60 |
| InnoDB System | SYS_FOREIGN_COLS | 32.00 KiB | 7.43 KiB | 2 | 2 | 2 | 83 |
| InnoDB System | SYS_TABLESPACES | 32.00 KiB | 3.65 KiB | 2 | 2 | 2 | 56 |
| InnoDB System | SYS_IBUF_TABLE | 16.00 KiB | 0 bytes | 1 | 1 | 1 | 0 |
+--------------------------+------------------------------------+------------+-----------+-------+--------------+-----------+-------------+
```
#### io_by_thread_by_latency / x$io_by_thread_by_latency
##### Description
Shows the top IO consumers by thread, ordered by total latency.
##### Example
```SQL
mysql> select * from io_by_thread_by_latency;
+---------------------+-------+---------------+-------------+-------------+-------------+-----------+----------------+
| user | total | total_latency | min_latency | avg_latency | max_latency | thread_id | processlist_id |
+---------------------+-------+---------------+-------------+-------------+-------------+-----------+----------------+
| root@localhost | 11580 | 18.01 s | 429.78 ns | 1.12 ms | 181.07 ms | 25 | 6 |
| main | 1358 | 1.31 s | 475.02 ns | 2.27 ms | 350.70 ms | 1 | NULL |
| page_cleaner_thread | 654 | 147.44 ms | 588.12 ns | 225.44 us | 46.41 ms | 18 | NULL |
| io_write_thread | 131 | 107.75 ms | 8.60 us | 822.55 us | 27.69 ms |
没有合适的资源?快使用搜索试试~ 我知道了~
mysql workbench免安装
共2000个文件
png:847个
pyc:747个
py:747个
5星 · 超过95%的资源 需积分: 50 144 下载量 125 浏览量
2015-02-02
11:04:15
上传
评论
收藏 39.77MB ZIP 举报
温馨提示
MySQL Workbench是一款专为MySQL设计的ER/数据库建模工具。它是著名的数据库设计工具DBDesigner4的继任者。你可以用MySQL Workbench设计和创建新的数据库图示,建立数据库文档,以及进行复杂的MySQL 迁移。
资源推荐
资源详情
资源评论
收起资源包目录
mysql workbench免安装 (2000个子文件)
audiotest.au 27KB
COPYING 18KB
rel1n.cur 326B
rel11.cur 326B
note.cur 326B
hand.cur 326B
view.cur 326B
magnify_region.cur 326B
rubber.cur 326B
zoom_out.cur 326B
routine.cur 326B
image.cur 326B
zoom_in.cur 326B
layer.cur 326B
table.cur 326B
relnm.cur 326B
data.db 3KB
mysql-parser.dll 37.31MB
wbprivate.be.dll 4.29MB
libmysql.dll 4.23MB
wbpublic.be.dll 3.8MB
python27.dll 2.33MB
db.mysql.sqlparser.grt.dll 2.09MB
sqlite3_d.dll 1.94MB
wbpublic.wr.dll 1.6MB
mysql.forms.dll 1.23MB
sqlite3.dll 1.21MB
sqlite3.dll 1.21MB
wbprivate.wr.dll 1.14MB
mforms.wr.dll 975KB
libxml2.dll 964KB
Scintilla.dll 927KB
iconv.dll 872KB
db.mysql.wbp.dll 824KB
grt.dll 818KB
libglib-2.0-0.dll 609KB
libcairo.dll 581KB
mysqlcppconn.dll 425KB
db.mysql.grt.dll 415KB
mysql.canvas.dll 370KB
libctemplate.dll 308KB
db.mysql.editors.wbp.be.dll 296KB
base.wr.dll 276KB
WBControls.dll 272KB
db.mysql.editors.wbp.fe.dll 270KB
wb.model.grt.dll 254KB
base.dll 244KB
libgobject-2.0-0.dll 222KB
HtmlRenderer.dll 216KB
wb.mysql.import.grt.dll 215KB
db.search.wbp.dll 214KB
libpng12-0.dll 198KB
WbPlugins.dll 194KB
db.mysql.editors.wbp.wr.dll 187KB
db.mysql.diff.reporting.wbp.dll 183KB
lua.dll 162KB
pcre.dll 156KB
Aga.Controls.dll 145KB
MySQLCsUtilities.dll 125KB
wb.model.editors.wbp.wr.dll 120KB
base.windows.dll 114KB
wb.model.editors.wbp.fe.dll 99KB
wb.model.editors.wbp.be.dll 93KB
db.mysql.query.grt.dll 90KB
grt.db.fe.dll 89KB
sqlide.fe.dll 89KB
cdbc.dll 86KB
wb.model.snippets.wbp.dll 84KB
wb.printing.wbp.fe.dll 78KB
zlib1.dll 76KB
wb.printing.wbp.be.dll 67KB
wb.utils.native.grt.dll 54KB
wb.printing.wbp.wr.dll 52KB
intl.dll 44KB
db.mysql.sqlide.grt.dll 42KB
db.grt.dll 22KB
libgthread-2.0-0.dll 22KB
libgmodule-2.0-0.dll 17KB
WBControls.Design.dll 5KB
mysql.exe 4.32MB
mysqldump.exe 4.31MB
MySQLWorkbench.exe 534KB
wbcopytables.exe 139KB
python.exe 26KB
wbadminhelper.exe 14KB
PyBanner048.gif 954B
MySQLWBPlugin.ico 281KB
MySQLWorkbenchDoc.ico 81KB
MySQLWorkbench.ico 43KB
sys_reports.js 20KB
python27_d.lib 232KB
python27.lib 224KB
sqlite3.lib 40KB
_ctypes_test.lib 21KB
_multiprocessing.lib 2KB
_socket.lib 2KB
_bsddb.lib 2KB
_elementtree.lib 2KB
unicodedata.lib 2KB
_testcapi.lib 2KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- baikai1995132015-05-24这个效果还行
- 柠檬_水2018-03-19可以用,很值得下载
- renyinick2017-06-01不错哦!!
- mendan2015-07-31可以用,还行
- liyanggyang2018-01-22goodgoodgoodgoodgoodgoodgoodgoodgood
lzq_129
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功