select * from performance_schema.events_transactions_current;
select table_schema, table_name, io_read_requests+io_write_requests as io_to_request from sys.schema_table_statistics group by table_schema, table_name order by io_to_request desc limit 10;
+--------------+----------------------+---------------+
| table_schema | table_name | io_to_request |
+--------------+----------------------+---------------+
| oa_2016 | form_trigger_record | 84115 |
| oa_2016 | form_log | 46547 |
| oa_2016 | ctp_content_all | 43784 |
| oa_2016 | org_relationship | 31541 |
(root@localhost)[sys]> select * from sys.schema_auto_increment_columns \G;
*************************** 1. row ***************************
table_schema: oa_2016
table_name: ctp_content_all
column_name: id
data_type: bigint
column_type: bigint(20)
is_signed: 1
is_unsigned: 0
max_value: 9223372036854775807
auto_increment: 9223369109454088264
auto_increment_ratio: 1.0000
(root@localhost)[sys]> select file,avg_read+avg_write as avg_io from sys.io_global_by_file_by_bytes order by avg_io desc limit 10;
+------------------------------------------------+--------+
| file | avg_io |
+------------------------------------------------+--------+
| @@datadir/oa_2016/portal_link_space.frm | 1668 |
| @@datadir/oa_2016/pro_eipusercustomsort.frm | 1633 |
| @@datadir/oa_2016/ctp_dr_url_map.frm | 1585 |
| @@datadir/oa_2016/office_auto_applyinfo.frm | 1583 |
| @@datadir/oa_2016/edoc_exchange_turn_rec.frm | 1521 |
| @@datadir/oa_2016/portal_portlet_property.frm | 1495 |
| @@datadir/oa_2016/showpost_info.frm | 1472 |
| @@datadir/oa_2016/cip_agent.frm | 1448 |
| @@datadir/oa_2016/thirdparty_portal_config.frm | 1437 |
| @@datadir/oa_2016/portal_link_option.frm | 1391 |
+------------------------------------------------+--------+
root@localhost)[sys]> select * from sys.statements_with_full_table_scans limit 2 \G;
*************************** 1. row ***************************
query: SELECT `newsreply0_` . `id` AS ... e_sum` DESC , `newsreply0_` .
db: oa_2016
exec_count: 5
total_latency: 997.89 us
no_index_used_count: 5
no_good_index_used_count: 0
no_index_used_pct: 100
rows_sent: 0
rows_examined: 0
rows_sent_avg: 0
rows_examined_avg: 0
first_seen: 2018-01-05 08:28:42
last_seen: 2018-01-10 10:44:40
digest: 207b3ea3c98e4253780a722248f64965
(root@localhost)[sys]> show variables like '%performance%';
+----------------------------------------------------------+-------+
| Variable_name | Value |
+----------------------------------------------------------+-------+
| performance_schema | ON |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28916011/viewspace-2150040/ ,如需转载,请注明出处,否则将追究法律责任。