mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#55416 Renaming of performance_schema tables for 5.5
Removed table SETUP_OBJECTS. Renamed table PROCESSLIST to THREADS. Renamed table EVENTS_WAITS_SUMMARY_BY_EVENT_NAME to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME. Adjusted Makefiles, code and tests accordingly.
This commit is contained in:
@ -90,27 +90,27 @@ SUM(SUM_NUMBER_OF_BYTES_WRITE) AS sum_num_bytes_write
|
||||
FROM performance_schema.FILE_SUMMARY_BY_INSTANCE
|
||||
WHERE FILE_NAME LIKE CONCAT('%', @@tmpdir, '%') ORDER BY NULL;
|
||||
SELECT EVENT_NAME, COUNT_STAR, AVG_TIMER_WAIT, SUM_TIMER_WAIT
|
||||
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME
|
||||
FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
|
||||
WHERE COUNT_STAR > 0
|
||||
ORDER BY SUM_TIMER_WAIT DESC
|
||||
LIMIT 10;
|
||||
SELECT i.user, SUM(TIMER_WAIT) SUM_WAIT
|
||||
# ((TIME_TO_SEC(TIMEDIFF(NOW(), i.startup_time)) * 1000) / SUM(TIMER_WAIT)) * 100 WAIT_PERCENTAGE
|
||||
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
|
||||
INNER JOIN performance_schema.PROCESSLIST p USING (THREAD_ID)
|
||||
INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
|
||||
LEFT JOIN information_schema.PROCESSLIST i USING (ID)
|
||||
GROUP BY i.user
|
||||
ORDER BY SUM_WAIT DESC
|
||||
LIMIT 20;
|
||||
SELECT h.EVENT_NAME, SUM(h.TIMER_WAIT) TOTAL_WAIT
|
||||
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
|
||||
INNER JOIN performance_schema.PROCESSLIST p USING (THREAD_ID)
|
||||
INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
|
||||
WHERE p.ID = 1
|
||||
GROUP BY h.EVENT_NAME
|
||||
HAVING TOTAL_WAIT > 0;
|
||||
SELECT i.user, h.operation, SUM(NUMBER_OF_BYTES) bytes
|
||||
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
|
||||
INNER JOIN performance_schema.PROCESSLIST p USING (THREAD_ID)
|
||||
INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
|
||||
LEFT JOIN information_schema.PROCESSLIST i USING (ID)
|
||||
GROUP BY i.user, h.operation
|
||||
HAVING BYTES > 0
|
||||
|
Reference in New Issue
Block a user