@@ -263,6 +263,24 @@ mysql> select * from memory_by_user_by_current_bytes WHERE user IS NOT NULL;
263263+ -- ----+--------------------+-------------------+-------------------+-------------------+-----------------+
264264```
265265
266+ #### memory_by_host_by_current_bytes / x$memory_by_host_by_current_bytes
267+
268+ ##### Description
269+
270+ Summarizes memory use by host using the 5.7 Performance Schema instrumentation.
271+
272+ ##### Example
273+
274+ ``` SQL
275+ mysql> select * from memory_by_host_by_current_bytes WHERE host IS NOT NULL ;
276+ + -- ----+--------------------+-------------------+-------------------+-------------------+-----------------+
277+ | host | current_count_used | current_allocated | current_avg_alloc | current_max_alloc | total_allocated |
278+ + -- ----+--------------------+-------------------+-------------------+-------------------+-----------------+
279+ | hal1 | 1401 | 1 .09 MiB | 815 bytes | 334 .97 KiB | 42 .73 MiB |
280+ | hal2 | 201 | 496 .08 KiB | 2 .47 KiB | 334 .97 KiB | 5 .50 MiB |
281+ + -- ----+--------------------+-------------------+-------------------+-------------------+-----------------+
282+ ```
283+
266284#### memory_global_by_current_allocated / x$memory_global_by_current_allocated
267285
268286##### Description
@@ -735,41 +753,6 @@ mysql> select * from user_summary;
735753+------+------------+-------------------+-----------------------+-------------+----------+-----------------+---------------------+-------------------+--------------+
736754```
737755
738- #### user_summary_by_file_io_type / x$user_summary_by_file_io_type
739-
740- ##### Description
741-
742- Summarizes file IO by event type per user.
743-
744- When the user found is NULL, it is assumed to be a "background" thread.
745-
746- ##### Example
747-
748- ```SQL
749- mysql> select * from user_summary_by_file_io_type;
750- +------------+--------------------------------------+-------+-----------+-------------+
751- | user | event_name | total | latency | max_latency |
752- +------------+--------------------------------------+-------+-----------+-------------+
753- | background | wait/io/file/sql/FRM | 871 | 168.15 ms | 18.48 ms |
754- | background | wait/io/file/innodb/innodb_data_file | 173 | 129.56 ms | 34.09 ms |
755- | background | wait/io/file/innodb/innodb_log_file | 20 | 77.53 ms | 60.66 ms |
756- | background | wait/io/file/myisam/dfile | 40 | 6.54 ms | 4.58 ms |
757- | background | wait/io/file/mysys/charset | 3 | 4.79 ms | 4.71 ms |
758- | background | wait/io/file/myisam/kfile | 67 | 4.38 ms | 300.04 us |
759- | background | wait/io/file/sql/ERRMSG | 5 | 2.72 ms | 1.69 ms |
760- | background | wait/io/file/sql/pid | 3 | 266.30 us | 185.47 us |
761- | background | wait/io/file/sql/casetest | 5 | 246.81 us | 150.19 us |
762- | background | wait/io/file/sql/global_ddl_log | 2 | 21.24 us | 18.59 us |
763- | root | wait/io/file/sql/file_parser | 1422 | 4.80 s | 135.14 ms |
764- | root | wait/io/file/sql/FRM | 865 | 85.82 ms | 9.81 ms |
765- | root | wait/io/file/myisam/kfile | 1073 | 37.14 ms | 15.79 ms |
766- | root | wait/io/file/myisam/dfile | 2991 | 25.53 ms | 5.25 ms |
767- | root | wait/io/file/sql/dbopt | 20 | 1.07 ms | 153.07 us |
768- | root | wait/io/file/sql/misc | 4 | 59.71 us | 33.75 us |
769- | root | wait/io/file/archive/data | 1 | 13.91 us | 13.91 us |
770- +------------+--------------------------------------+-------+-----------+-------------+
771- ```
772-
773756#### user_summary_by_file_io / x$user_summary_by_file_io
774757
775758##### Description
@@ -916,6 +899,148 @@ mysql> select * from user_summary_by_statement_type;
916899+------+------------------+-------+---------------+-------------+--------------+-----------+---------------+---------------+------------+
917900```
918901
902+ #### host_summary / x$host_summary
903+
904+ ##### Description
905+
906+ Summarizes statement activity, file IO and connections by host.
907+
908+ ##### Example
909+
910+ ```SQL
911+ mysql> select * from host_summary;
912+ +------+------------+-------------------+-----------------------+-------------+----------+-----------------+---------------------+-------------------+--------------+
913+ | host | statements | statement_latency | statement_avg_latency | table_scans | file_ios | file_io_latency | current_connections | total_connections | unique_users |
914+ +------+------------+-------------------+-----------------------+-------------+----------+-----------------+---------------------+-------------------+--------------+
915+ | hal1 | 2924 | 00:03:59.53 | 81.92 ms | 82 | 54702 | 55.61 s | 1 | 1 | 1 |
916+ +------+------------+-------------------+-----------------------+-------------+----------+-----------------+---------------------+-------------------+--------------+
917+
918+ ```
919+
920+ #### host_summary_by_file_io / x$host_summary_by_file_io
921+
922+ ##### Description
923+
924+ Summarizes file IO totals per host.
925+
926+ ##### Example
927+
928+ ```SQL
929+ mysql> select * from host_summary_by_file_io;
930+ +------------+-------+------------+
931+ | host | ios | io_latency |
932+ +------------+-------+------------+
933+ | hal1 | 26457 | 21.58 s |
934+ | hal2 | 1189 | 394.21 ms |
935+ +------------+-------+------------+
936+ ```
937+
938+ #### host_summary_by_file_io_type / x$host_summary_by_file_io_type
939+
940+ ##### Description
941+
942+ Summarizes file IO by event type per host.
943+
944+ ##### Example
945+
946+ ```SQL
947+ mysql> select * from host_summary_by_file_io_type;
948+ +------------+--------------------------------------+-------+-----------+-------------+
949+ | host | event_name | total | latency | max_latency |
950+ +------------+--------------------------------------+-------+-----------+-------------+
951+ | hal1 | wait/io/file/sql/FRM | 871 | 168.15 ms | 18.48 ms |
952+ | hal1 | wait/io/file/innodb/innodb_data_file | 173 | 129.56 ms | 34.09 ms |
953+ | hal1 | wait/io/file/innodb/innodb_log_file | 20 | 77.53 ms | 60.66 ms |
954+ | hal1 | wait/io/file/myisam/dfile | 40 | 6.54 ms | 4.58 ms |
955+ | hal1 | wait/io/file/mysys/charset | 3 | 4.79 ms | 4.71 ms |
956+ | hal1 | wait/io/file/myisam/kfile | 67 | 4.38 ms | 300.04 us |
957+ | hal1 | wait/io/file/sql/ERRMSG | 5 | 2.72 ms | 1.69 ms |
958+ | hal1 | wait/io/file/sql/pid | 3 | 266.30 us | 185.47 us |
959+ | hal1 | wait/io/file/sql/casetest | 5 | 246.81 us | 150.19 us |
960+ | hal1 | wait/io/file/sql/global_ddl_log | 2 | 21.24 us | 18.59 us |
961+ | hal2 | wait/io/file/sql/file_parser | 1422 | 4.80 s | 135.14 ms |
962+ | hal2 | wait/io/file/sql/FRM | 865 | 85.82 ms | 9.81 ms |
963+ | hal2 | wait/io/file/myisam/kfile | 1073 | 37.14 ms | 15.79 ms |
964+ | hal2 | wait/io/file/myisam/dfile | 2991 | 25.53 ms | 5.25 ms |
965+ | hal2 | wait/io/file/sql/dbopt | 20 | 1.07 ms | 153.07 us |
966+ | hal2 | wait/io/file/sql/misc | 4 | 59.71 us | 33.75 us |
967+ | hal2 | wait/io/file/archive/data | 1 | 13.91 us | 13.91 us |
968+ +------------+--------------------------------------+-------+-----------+-------------+
969+ ```
970+
971+ #### host_summary_by_stages / x$host_summary_by_stages
972+
973+ ##### Description
974+
975+ Summarizes stages by host, ordered by host and total latency per stage.
976+
977+ ##### Example
978+
979+ ```SQL
980+ mysql> select * from host_summary_by_stages;
981+ +------+--------------------------------+-------+-----------+-----------+
982+ | host | event_name | total | wait_sum | wait_avg |
983+ +------+--------------------------------+-------+-----------+-----------+
984+ | hal | stage/sql/Opening tables | 889 | 1.97 ms | 2.22 us |
985+ | hal | stage/sql/Creating sort index | 4 | 1.79 ms | 446.30 us |
986+ | hal | stage/sql/init | 10 | 312.27 us | 31.23 us |
987+ | hal | stage/sql/checking permissions | 10 | 300.62 us | 30.06 us |
988+ | hal | stage/sql/freeing items | 5 | 85.89 us | 17.18 us |
989+ | hal | stage/sql/statistics | 5 | 79.15 us | 15.83 us |
990+ | hal | stage/sql/preparing | 5 | 69.12 us | 13.82 us |
991+ | hal | stage/sql/optimizing | 5 | 53.11 us | 10.62 us |
992+ | hal | stage/sql/Sending data | 5 | 44.66 us | 8.93 us |
993+ | hal | stage/sql/closing tables | 5 | 37.54 us | 7.51 us |
994+ | hal | stage/sql/System lock | 5 | 34.28 us | 6.86 us |
995+ | hal | stage/sql/query end | 5 | 24.37 us | 4.87 us |
996+ | hal | stage/sql/end | 5 | 8.60 us | 1.72 us |
997+ | hal | stage/sql/Sorting result | 5 | 8.33 us | 1.67 us |
998+ | hal | stage/sql/executing | 5 | 5.37 us | 1.07 us |
999+ | hal | stage/sql/cleaning up | 5 | 4.60 us | 919.00 ns |
1000+ +------+--------------------------------+-------+-----------+-----------+
1001+ ```
1002+
1003+ #### host_summary_by_statement_latency / x$host_summary_by_statement_latency
1004+
1005+ ##### Description
1006+
1007+ Summarizes overall statement statistics by host.
1008+
1009+ ##### Example
1010+
1011+ ```SQL
1012+ mysql> select * from host_summary_by_statement_latency;
1013+ +------+-------+---------------+-------------+--------------+-----------+---------------+---------------+------------+
1014+ | host | total | total_latency | max_latency | lock_latency | rows_sent | rows_examined | rows_affected | full_scans |
1015+ +------+-------+---------------+-------------+--------------+-----------+---------------+---------------+------------+
1016+ | hal | 3381 | 00:02:09.13 | 1.48 s | 1.07 s | 1151 | 93947 | 150 | 91 |
1017+ +------+-------+---------------+-------------+--------------+-----------+---------------+---------------+------------+
1018+ ```
1019+
1020+ #### host_summary_by_statement_type / x$host_summary_by_statement_type
1021+
1022+ ##### Description
1023+
1024+ Summarizes the types of statements executed by each host.
1025+
1026+ ##### Example
1027+
1028+ ```SQL
1029+ mysql> select * from host_summary_by_statement_type;
1030+ +------+----------------------+--------+---------------+-------------+--------------+-----------+---------------+---------------+------------+
1031+ | host | statement | total | total_latency | max_latency | lock_latency | rows_sent | rows_examined | rows_affected | full_scans |
1032+ +------+----------------------+--------+---------------+-------------+--------------+-----------+---------------+---------------+------------+
1033+ | hal | create_view | 2063 | 00:05:04.20 | 463.58 ms | 1.42 s | 0 | 0 | 0 | 0 |
1034+ | hal | select | 174 | 40.87 s | 28.83 s | 858.13 ms | 5212 | 157022 | 0 | 82 |
1035+ | hal | stmt | 6645 | 15.31 s | 491.78 ms | 0 ps | 0 | 0 | 7951 | 0 |
1036+ | hal | call_procedure | 17 | 4.78 s | 1.02 s | 37.94 ms | 0 | 0 | 19 | 0 |
1037+ | hal | create_table | 19 | 3.04 s | 431.71 ms | 0 ps | 0 | 0 | 0 | 0 |
1038+ ...
1039+ +------+----------------------+--------+---------------+-------------+--------------+-----------+---------------+---------------+------------+
1040+
1041+ ```
1042+
1043+
9191044#### wait_classes_global_by_avg_latency / x$wait_classes_global_by_avg_latency
9201045
9211046##### Description
@@ -964,7 +1089,7 @@ mysql> select * from wait_classes_global_by_latency;
9641089
9651090##### Description
9661091
967- Lists the top wait events by their total latency, ignoring idle (this may be very large).
1092+ Lists the top wait events by their total latency, ignoring idle (this may be very large) per user .
9681093
9691094##### Example
9701095
@@ -991,6 +1116,37 @@ mysql> select * from waits_by_user_by_latency;
9911116+------+-----------------------------------------------------+--------+---------------+-------------+-------------+
9921117```
9931118
1119+ #### waits_by_host_by_latency / x$waits_by_host_by_latency
1120+
1121+ ##### Description
1122+
1123+ Lists the top wait events by their total latency, ignoring idle (this may be very large) per host.
1124+
1125+ ##### Example
1126+
1127+ ```SQL
1128+ mysql> select * from waits_by_host_by_latency;
1129+ +------+-----------------------------------------------------+--------+---------------+-------------+-------------+
1130+ | host | event | total | total_latency | avg_latency | max_latency |
1131+ +------+-----------------------------------------------------+--------+---------------+-------------+-------------+
1132+ | hal1 | wait/io/file/sql/file_parser | 13743 | 00:01:00.46 | 4.40 ms | 231.88 ms |
1133+ | hal1 | wait/io/file/innodb/innodb_data_file | 4699 | 3.02 s | 643.38 us | 46.93 ms |
1134+ | hal1 | wait/io/file/sql/FRM | 11462 | 2.60 s | 226.83 us | 61.72 ms |
1135+ | hal1 | wait/io/file/myisam/dfile | 26776 | 746.70 ms | 27.89 us | 308.79 ms |
1136+ | hal1 | wait/io/file/myisam/kfile | 7126 | 462.66 ms | 64.93 us | 88.76 ms |
1137+ | hal1 | wait/io/file/sql/dbopt | 179 | 137.58 ms | 768.59 us | 15.46 ms |
1138+ | hal1 | wait/io/file/csv/metadata | 8 | 86.60 ms | 10.82 ms | 50.32 ms |
1139+ | hal1 | wait/synch/mutex/mysys/IO_CACHE::append_buffer_lock | 798080 | 66.46 ms | 82.94 ns | 161.03 us |
1140+ | hal1 | wait/io/file/sql/binlog | 19 | 49.11 ms | 2.58 ms | 9.40 ms |
1141+ | hal1 | wait/io/file/sql/misc | 26 | 22.38 ms | 860.80 us | 15.30 ms |
1142+ | hal1 | wait/io/file/csv/data | 4 | 297.46 us | 74.37 us | 111.93 us |
1143+ | hal1 | wait/synch/rwlock/sql/MDL_lock::rwlock | 944 | 287.86 us | 304.62 ns | 874.64 ns |
1144+ | hal1 | wait/io/file/archive/data | 4 | 82.71 us | 20.68 us | 40.74 us |
1145+ | hal1 | wait/synch/mutex/myisam/MYISAM_SHARE::intern_lock | 60 | 12.21 us | 203.20 ns | 512.72 ns |
1146+ | hal1 | wait/synch/mutex/innodb/trx_mutex | 81 | 5.93 us | 73.14 ns | 252.59 ns |
1147+ +------+-----------------------------------------------------+--------+---------------+-------------+-------------+
1148+ ```
1149+
9941150#### waits_global_by_latency / x$waits_global_by_latency
9951151
9961152##### Description
0 commit comments