If you can't read please download the document
Upload
mikiya-okuno
View
11.925
Download
1
Embed Size (px)
DESCRIPTION
MySQL Casual #2で使ったスライドです。
Citation preview
2.
3. Performance Schema
4. MySQL 5.5 5. 6. 7. MySQL
8. 9. 10. 11.
12.
13. 14. 15. X 16. 17. 18. CT 19. MRI 20. : NG 21. MySQL 22.
23.
24. shell> mysqladmin ping 25. STATUS
Uptime: 79283Threads: 1Questions: 265Slow queries: 0Opens: 219Flush tables: 1Open tables: 53Queries per second avg: 0.3
26. shell> mysqladmin status 27. SHOW
28. 29.
30. SHOW GLOBAL STATUS 31. SHOW SLAVE STATUS 32. SHOW BINARY LOGS 33. : 34. INFORMATION_SCHEMA
35. 36. SHOW
37. EXPLAIN
38.
39. SHOW PROFILE
40. Sending data
41. SELECT 42. SHOW PROFILE; 43.
44.
45. 46. 47. 48. GDB
49. 50.
51. Dtrace/SystemTap...
52. 53. Solaris Linux
54. DBUG
55. 56. /tmp/mysqld.trace
57. debug 58. 59. 60. PERFORMANCE_SCHEMA!
61. Instruments 62. SQL 63. 64. Windows OK 65.
66. PC
67. 2285.76 per sec vs 1804.77 per sec
68. Load Balancer P_S APP 69. INFORMATION_SCHEMA
70. 71. SQL 72.
73. P_S 74. MySQL 75. 76.
77. mysql_install_db 78.
79. performance_schema 80. 81. SELECT * FROM performance_schema.objects_summary_global_by_type where object_schema='sbtest'G *************************** 1. row *************************** OBJECT_TYPE: TABLE OBJECT_SCHEMA: sbtest OBJECT_NAME: sbtest COUNT_STAR: 25368838 SUM_TIMER_WAIT: 35553955610133 MIN_TIMER_WAIT: 61953 AVG_TIMER_WAIT: 1401180 MAX_TIMER_WAIT: 21716203284 1 row in set (0.01 sec) 82. mysql-5.6-labs-performance-schema
83. MySQL 5.6 84. 85. 86. 87.
88. instance mutex 89. wait event 90. stage event 91. statement event 92. table io event 93. summary 94. Summary events_stages_summary_by_host_by_event_name
95. stage 96. statement 97. table io
98. by_instance 99. by_thread_by_event_name 100. by_user_by_event_name 101. by_user_host_by_event_name 102. by_global_by_event_name 103.
104. table_io_waits_summary_by_table 105. events_statements_history_long 106.
107. ORDER BY COUNT_STAR DESC
108. pager less 109. create view top_access_tables as select * from performance_schema. objects_summary_global_by_type order by count_star desc limit 10; 110. 111.
112. Windows 113. 114. 115. 116. 117. Q&A 118.
119. Blog: http://nippondanji.blogspot.com/ 120. Twitter: @nippondanji 121. http://www.facebook.com/mikiya.okuno 122.