diff options
Diffstat (limited to 'scripts/sys_schema/views/p_s')
35 files changed, 109 insertions, 109 deletions
diff --git a/scripts/sys_schema/views/p_s/host_summary.sql b/scripts/sys_schema/views/p_s/host_summary.sql index 080100a4241..99ed0942a9c 100644 --- a/scripts/sys_schema/views/p_s/host_summary.sql +++ b/scripts/sys_schema/views/p_s/host_summary.sql @@ -46,11 +46,11 @@ VIEW host_summary ( ) AS SELECT IF(accounts.host IS NULL, 'background', accounts.host) AS host, SUM(stmt.total) AS statements, - sys.format_time(SUM(stmt.total_latency)) AS statement_latency, - sys.format_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency, + format_pico_time(SUM(stmt.total_latency)) AS statement_latency, + format_pico_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency, SUM(stmt.full_scans) AS table_scans, SUM(io.ios) AS file_ios, - sys.format_time(SUM(io.io_latency)) AS file_io_latency, + format_pico_time(SUM(io.io_latency)) AS file_io_latency, SUM(accounts.current_connections) AS current_connections, SUM(accounts.total_connections) AS total_connections, COUNT(DISTINCT accounts.user) AS unique_users diff --git a/scripts/sys_schema/views/p_s/host_summary_57.sql b/scripts/sys_schema/views/p_s/host_summary_57.sql index cd0739f495f..dc5fb1e9006 100644 --- a/scripts/sys_schema/views/p_s/host_summary_57.sql +++ b/scripts/sys_schema/views/p_s/host_summary_57.sql @@ -49,11 +49,11 @@ VIEW host_summary ( ) AS SELECT IF(accounts.host IS NULL, 'background', accounts.host) AS host, SUM(stmt.total) AS statements, - sys.format_time(SUM(stmt.total_latency)) AS statement_latency, - sys.format_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency, + format_pico_time(SUM(stmt.total_latency)) AS statement_latency, + format_pico_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency, SUM(stmt.full_scans) AS table_scans, SUM(io.ios) AS file_ios, - sys.format_time(SUM(io.io_latency)) AS file_io_latency, + format_pico_time(SUM(io.io_latency)) AS file_io_latency, SUM(accounts.current_connections) AS current_connections, SUM(accounts.total_connections) AS total_connections, COUNT(DISTINCT user) AS unique_users, diff --git a/scripts/sys_schema/views/p_s/host_summary_by_file_io.sql b/scripts/sys_schema/views/p_s/host_summary_by_file_io.sql index e1fbf2ea29d..c8aa6f8bf87 100644 --- a/scripts/sys_schema/views/p_s/host_summary_by_file_io.sql +++ b/scripts/sys_schema/views/p_s/host_summary_by_file_io.sql @@ -40,7 +40,7 @@ VIEW host_summary_by_file_io ( ) AS SELECT IF(host IS NULL, 'background', host) AS host, SUM(count_star) AS ios, - sys.format_time(SUM(sum_timer_wait)) AS io_latency + format_pico_time(SUM(sum_timer_wait)) AS io_latency FROM performance_schema.events_waits_summary_by_host_by_event_name WHERE event_name LIKE 'wait/io/file/%' GROUP BY IF(host IS NULL, 'background', host) diff --git a/scripts/sys_schema/views/p_s/host_summary_by_file_io_type.sql b/scripts/sys_schema/views/p_s/host_summary_by_file_io_type.sql index 58567e3f7f2..f85c18a0724 100644 --- a/scripts/sys_schema/views/p_s/host_summary_by_file_io_type.sql +++ b/scripts/sys_schema/views/p_s/host_summary_by_file_io_type.sql @@ -58,8 +58,8 @@ VIEW host_summary_by_file_io_type ( SELECT IF(host IS NULL, 'background', host) AS host, event_name, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(max_timer_wait) AS max_latency + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(max_timer_wait) AS max_latency FROM performance_schema.events_waits_summary_by_host_by_event_name WHERE event_name LIKE 'wait/io/file%' AND count_star > 0 diff --git a/scripts/sys_schema/views/p_s/host_summary_by_stages.sql b/scripts/sys_schema/views/p_s/host_summary_by_stages.sql index 97e5a7eef98..063c8a89d4b 100644 --- a/scripts/sys_schema/views/p_s/host_summary_by_stages.sql +++ b/scripts/sys_schema/views/p_s/host_summary_by_stages.sql @@ -57,8 +57,8 @@ VIEW host_summary_by_stages ( SELECT IF(host IS NULL, 'background', host) AS host, event_name, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(avg_timer_wait) AS avg_latency + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(avg_timer_wait) AS avg_latency FROM performance_schema.events_stages_summary_by_host_by_event_name WHERE sum_timer_wait != 0 ORDER BY IF(host IS NULL, 'background', host), sum_timer_wait DESC; diff --git a/scripts/sys_schema/views/p_s/host_summary_by_statement_latency.sql b/scripts/sys_schema/views/p_s/host_summary_by_statement_latency.sql index 9eeb4c30d80..b0a902c79a2 100644 --- a/scripts/sys_schema/views/p_s/host_summary_by_statement_latency.sql +++ b/scripts/sys_schema/views/p_s/host_summary_by_statement_latency.sql @@ -45,9 +45,9 @@ VIEW host_summary_by_statement_latency ( ) AS SELECT IF(host IS NULL, 'background', host) AS host, SUM(count_star) AS total, - sys.format_time(SUM(sum_timer_wait)) AS total_latency, - sys.format_time(MAX(max_timer_wait)) AS max_latency, - sys.format_time(SUM(sum_lock_time)) AS lock_latency, + format_pico_time(SUM(sum_timer_wait)) AS total_latency, + format_pico_time(MAX(max_timer_wait)) AS max_latency, + format_pico_time(SUM(sum_lock_time)) AS lock_latency, SUM(sum_rows_sent) AS rows_sent, SUM(sum_rows_examined) AS rows_examined, SUM(sum_rows_affected) AS rows_affected, diff --git a/scripts/sys_schema/views/p_s/host_summary_by_statement_type.sql b/scripts/sys_schema/views/p_s/host_summary_by_statement_type.sql index b529cd8c68d..3a85478ecdb 100644 --- a/scripts/sys_schema/views/p_s/host_summary_by_statement_type.sql +++ b/scripts/sys_schema/views/p_s/host_summary_by_statement_type.sql @@ -52,9 +52,9 @@ VIEW host_summary_by_statement_type ( SELECT IF(host IS NULL, 'background', host) AS host, SUBSTRING_INDEX(event_name, '/', -1) AS statement, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(max_timer_wait) AS max_latency, - sys.format_time(sum_lock_time) AS lock_latency, + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(max_timer_wait) AS max_latency, + format_pico_time(sum_lock_time) AS lock_latency, sum_rows_sent AS rows_sent, sum_rows_examined AS rows_examined, sum_rows_affected AS rows_affected, diff --git a/scripts/sys_schema/views/p_s/io_by_thread_by_latency.sql b/scripts/sys_schema/views/p_s/io_by_thread_by_latency.sql index c5bf1c693c2..a4e87dd7ace 100644 --- a/scripts/sys_schema/views/p_s/io_by_thread_by_latency.sql +++ b/scripts/sys_schema/views/p_s/io_by_thread_by_latency.sql @@ -56,10 +56,10 @@ SELECT IF(processlist_id IS NULL, CONCAT(processlist_user, '@', processlist_host) ) user, SUM(count_star) total, - sys.format_time(SUM(sum_timer_wait)) total_latency, - sys.format_time(MIN(min_timer_wait)) min_latency, - sys.format_time(AVG(avg_timer_wait)) avg_latency, - sys.format_time(MAX(max_timer_wait)) max_latency, + format_pico_time(SUM(sum_timer_wait)) total_latency, + format_pico_time(MIN(min_timer_wait)) min_latency, + format_pico_time(AVG(avg_timer_wait)) avg_latency, + format_pico_time(MAX(max_timer_wait)) max_latency, thread_id, processlist_id FROM performance_schema.events_waits_summary_by_thread_by_event_name diff --git a/scripts/sys_schema/views/p_s/io_global_by_file_by_latency.sql b/scripts/sys_schema/views/p_s/io_global_by_file_by_latency.sql index 97b0aae97c1..793d4bd7a2d 100644 --- a/scripts/sys_schema/views/p_s/io_global_by_file_by_latency.sql +++ b/scripts/sys_schema/views/p_s/io_global_by_file_by_latency.sql @@ -47,12 +47,12 @@ VIEW io_global_by_file_by_latency ( ) AS SELECT sys.format_path(file_name) AS file, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, + format_pico_time(sum_timer_wait) AS total_latency, count_read, - sys.format_time(sum_timer_read) AS read_latency, + format_pico_time(sum_timer_read) AS read_latency, count_write, - sys.format_time(sum_timer_write) AS write_latency, + format_pico_time(sum_timer_write) AS write_latency, count_misc, - sys.format_time(sum_timer_misc) AS misc_latency + format_pico_time(sum_timer_misc) AS misc_latency FROM performance_schema.file_summary_by_instance ORDER BY sum_timer_wait DESC; diff --git a/scripts/sys_schema/views/p_s/io_global_by_wait_by_bytes.sql b/scripts/sys_schema/views/p_s/io_global_by_wait_by_bytes.sql index edf6b994303..0ec1a26c6b6 100644 --- a/scripts/sys_schema/views/p_s/io_global_by_wait_by_bytes.sql +++ b/scripts/sys_schema/views/p_s/io_global_by_wait_by_bytes.sql @@ -62,10 +62,10 @@ VIEW io_global_by_wait_by_bytes ( ) AS SELECT SUBSTRING_INDEX(event_name, '/', -2) event_name, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(min_timer_wait) AS min_latency, - sys.format_time(avg_timer_wait) AS avg_latency, - sys.format_time(max_timer_wait) AS max_latency, + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(min_timer_wait) AS min_latency, + format_pico_time(avg_timer_wait) AS avg_latency, + format_pico_time(max_timer_wait) AS max_latency, count_read, sys.format_bytes(sum_number_of_bytes_read) AS total_read, sys.format_bytes(IFNULL(sum_number_of_bytes_read / NULLIF(count_read, 0), 0)) AS avg_read, diff --git a/scripts/sys_schema/views/p_s/io_global_by_wait_by_latency.sql b/scripts/sys_schema/views/p_s/io_global_by_wait_by_latency.sql index 5783e98ca4e..8391aae887f 100644 --- a/scripts/sys_schema/views/p_s/io_global_by_wait_by_latency.sql +++ b/scripts/sys_schema/views/p_s/io_global_by_wait_by_latency.sql @@ -63,12 +63,12 @@ VIEW io_global_by_wait_by_latency ( ) AS SELECT SUBSTRING_INDEX(event_name, '/', -2) AS event_name, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(avg_timer_wait) AS avg_latency, - sys.format_time(max_timer_wait) AS max_latency, - sys.format_time(sum_timer_read) AS read_latency, - sys.format_time(sum_timer_write) AS write_latency, - sys.format_time(sum_timer_misc) AS misc_latency, + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(avg_timer_wait) AS avg_latency, + format_pico_time(max_timer_wait) AS max_latency, + format_pico_time(sum_timer_read) AS read_latency, + format_pico_time(sum_timer_write) AS write_latency, + format_pico_time(sum_timer_misc) AS misc_latency, count_read, sys.format_bytes(sum_number_of_bytes_read) AS total_read, sys.format_bytes(IFNULL(sum_number_of_bytes_read / NULLIF(count_read, 0), 0)) AS avg_read, diff --git a/scripts/sys_schema/views/p_s/latest_file_io.sql b/scripts/sys_schema/views/p_s/latest_file_io.sql index 9803cc6cd8b..5289a831a2d 100644 --- a/scripts/sys_schema/views/p_s/latest_file_io.sql +++ b/scripts/sys_schema/views/p_s/latest_file_io.sql @@ -46,7 +46,7 @@ SELECT IF(id IS NULL, CONCAT(user, '@', host, ':', id) ) thread, sys.format_path(object_name) file, - sys.format_time(timer_wait) AS latency, + format_pico_time(timer_wait) AS latency, operation, sys.format_bytes(number_of_bytes) AS requested FROM performance_schema.events_waits_history_long diff --git a/scripts/sys_schema/views/p_s/processlist.sql b/scripts/sys_schema/views/p_s/processlist.sql index 33e8969f73f..e289a07bd34 100644 --- a/scripts/sys_schema/views/p_s/processlist.sql +++ b/scripts/sys_schema/views/p_s/processlist.sql @@ -82,9 +82,9 @@ SELECT pps.thread_id AS thd_id, pps.processlist_time AS time, sys.format_statement(pps.processlist_info) AS current_statement, IF(esc.end_event_id IS NULL, - sys.format_time(esc.timer_wait), + format_pico_time(esc.timer_wait), NULL) AS statement_latency, - sys.format_time(esc.lock_time) AS lock_latency, + format_pico_time(esc.lock_time) AS lock_latency, esc.rows_examined AS rows_examined, esc.rows_sent AS rows_sent, esc.rows_affected AS rows_affected, @@ -95,12 +95,12 @@ SELECT pps.thread_id AS thd_id, sys.format_statement(esc.sql_text), NULL) AS last_statement, IF(esc.end_event_id IS NOT NULL, - sys.format_time(esc.timer_wait), + format_pico_time(esc.timer_wait), NULL) AS last_statement_latency, ewc.event_name AS last_wait, IF(ewc.end_event_id IS NULL AND ewc.event_name IS NOT NULL, 'Still Waiting', - sys.format_time(ewc.timer_wait)) last_wait_latency, + format_pico_time(ewc.timer_wait)) last_wait_latency, ewc.source FROM performance_schema.threads AS pps LEFT JOIN performance_schema.events_waits_current AS ewc USING (thread_id) diff --git a/scripts/sys_schema/views/p_s/processlist_57.sql b/scripts/sys_schema/views/p_s/processlist_57.sql index 4e4f21ead3f..2cb30bd09f4 100644 --- a/scripts/sys_schema/views/p_s/processlist_57.sql +++ b/scripts/sys_schema/views/p_s/processlist_57.sql @@ -98,12 +98,12 @@ SELECT pps.thread_id AS thd_id, pps.processlist_time AS time, sys.format_statement(pps.processlist_info) AS current_statement, IF(esc.end_event_id IS NULL, - sys.format_time(esc.timer_wait), + format_pico_time(esc.timer_wait), NULL) AS statement_latency, IF(esc.end_event_id IS NULL, ROUND(100 * (estc.work_completed / estc.work_estimated), 2), NULL) AS progress, - sys.format_time(esc.lock_time) AS lock_latency, + format_pico_time(esc.lock_time) AS lock_latency, esc.rows_examined AS rows_examined, esc.rows_sent AS rows_sent, esc.rows_affected AS rows_affected, @@ -114,15 +114,15 @@ SELECT pps.thread_id AS thd_id, sys.format_statement(esc.sql_text), NULL) AS last_statement, IF(esc.end_event_id IS NOT NULL, - sys.format_time(esc.timer_wait), + format_pico_time(esc.timer_wait), NULL) AS last_statement_latency, sys.format_bytes(mem.current_allocated) AS current_memory, ewc.event_name AS last_wait, IF(ewc.end_event_id IS NULL AND ewc.event_name IS NOT NULL, 'Still Waiting', - sys.format_time(ewc.timer_wait)) last_wait_latency, + format_pico_time(ewc.timer_wait)) last_wait_latency, ewc.source, - sys.format_time(etc.timer_wait) AS trx_latency, + format_pico_time(etc.timer_wait) AS trx_latency, etc.state AS trx_state, etc.autocommit AS trx_autocommit, conattr_pid.attr_value as pid, diff --git a/scripts/sys_schema/views/p_s/schema_index_statistics.sql b/scripts/sys_schema/views/p_s/schema_index_statistics.sql index 84ce7ead5cf..794af16d199 100644 --- a/scripts/sys_schema/views/p_s/schema_index_statistics.sql +++ b/scripts/sys_schema/views/p_s/schema_index_statistics.sql @@ -53,13 +53,13 @@ SELECT OBJECT_SCHEMA AS table_schema, OBJECT_NAME AS table_name, INDEX_NAME as index_name, COUNT_FETCH AS rows_selected, - sys.format_time(SUM_TIMER_FETCH) AS select_latency, + format_pico_time(SUM_TIMER_FETCH) AS select_latency, COUNT_INSERT AS rows_inserted, - sys.format_time(SUM_TIMER_INSERT) AS insert_latency, + format_pico_time(SUM_TIMER_INSERT) AS insert_latency, COUNT_UPDATE AS rows_updated, - sys.format_time(SUM_TIMER_UPDATE) AS update_latency, + format_pico_time(SUM_TIMER_UPDATE) AS update_latency, COUNT_DELETE AS rows_deleted, - sys.format_time(SUM_TIMER_INSERT) AS delete_latency + format_pico_time(SUM_TIMER_INSERT) AS delete_latency FROM performance_schema.table_io_waits_summary_by_index_usage WHERE index_name IS NOT NULL ORDER BY sum_timer_wait DESC; diff --git a/scripts/sys_schema/views/p_s/schema_table_statistics.sql b/scripts/sys_schema/views/p_s/schema_table_statistics.sql index 198d2e0ee7c..45d714a1e36 100644 --- a/scripts/sys_schema/views/p_s/schema_table_statistics.sql +++ b/scripts/sys_schema/views/p_s/schema_table_statistics.sql @@ -70,23 +70,23 @@ VIEW schema_table_statistics ( ) AS SELECT pst.object_schema AS table_schema, pst.object_name AS table_name, - sys.format_time(pst.sum_timer_wait) AS total_latency, + format_pico_time(pst.sum_timer_wait) AS total_latency, pst.count_fetch AS rows_fetched, - sys.format_time(pst.sum_timer_fetch) AS fetch_latency, + format_pico_time(pst.sum_timer_fetch) AS fetch_latency, pst.count_insert AS rows_inserted, - sys.format_time(pst.sum_timer_insert) AS insert_latency, + format_pico_time(pst.sum_timer_insert) AS insert_latency, pst.count_update AS rows_updated, - sys.format_time(pst.sum_timer_update) AS update_latency, + format_pico_time(pst.sum_timer_update) AS update_latency, pst.count_delete AS rows_deleted, - sys.format_time(pst.sum_timer_delete) AS delete_latency, + format_pico_time(pst.sum_timer_delete) AS delete_latency, fsbi.count_read AS io_read_requests, sys.format_bytes(fsbi.sum_number_of_bytes_read) AS io_read, - sys.format_time(fsbi.sum_timer_read) AS io_read_latency, + format_pico_time(fsbi.sum_timer_read) AS io_read_latency, fsbi.count_write AS io_write_requests, sys.format_bytes(fsbi.sum_number_of_bytes_write) AS io_write, - sys.format_time(fsbi.sum_timer_write) AS io_write_latency, + format_pico_time(fsbi.sum_timer_write) AS io_write_latency, fsbi.count_misc AS io_misc_requests, - sys.format_time(fsbi.sum_timer_misc) AS io_misc_latency + format_pico_time(fsbi.sum_timer_misc) AS io_misc_latency FROM performance_schema.table_io_waits_summary_by_table AS pst LEFT JOIN x$ps_schema_table_statistics_io AS fsbi ON pst.object_schema = fsbi.table_schema diff --git a/scripts/sys_schema/views/p_s/schema_table_statistics_with_buffer.sql b/scripts/sys_schema/views/p_s/schema_table_statistics_with_buffer.sql index acdaefb355f..73342194e9e 100644 --- a/scripts/sys_schema/views/p_s/schema_table_statistics_with_buffer.sql +++ b/scripts/sys_schema/views/p_s/schema_table_statistics_with_buffer.sql @@ -87,21 +87,21 @@ VIEW schema_table_statistics_with_buffer ( SELECT pst.object_schema AS table_schema, pst.object_name AS table_name, pst.count_fetch AS rows_fetched, - sys.format_time(pst.sum_timer_fetch) AS fetch_latency, + format_pico_time(pst.sum_timer_fetch) AS fetch_latency, pst.count_insert AS rows_inserted, - sys.format_time(pst.sum_timer_insert) AS insert_latency, + format_pico_time(pst.sum_timer_insert) AS insert_latency, pst.count_update AS rows_updated, - sys.format_time(pst.sum_timer_update) AS update_latency, + format_pico_time(pst.sum_timer_update) AS update_latency, pst.count_delete AS rows_deleted, - sys.format_time(pst.sum_timer_delete) AS delete_latency, + format_pico_time(pst.sum_timer_delete) AS delete_latency, fsbi.count_read AS io_read_requests, sys.format_bytes(fsbi.sum_number_of_bytes_read) AS io_read, - sys.format_time(fsbi.sum_timer_read) AS io_read_latency, + format_pico_time(fsbi.sum_timer_read) AS io_read_latency, fsbi.count_write AS io_write_requests, sys.format_bytes(fsbi.sum_number_of_bytes_write) AS io_write, - sys.format_time(fsbi.sum_timer_write) AS io_write_latency, + format_pico_time(fsbi.sum_timer_write) AS io_write_latency, fsbi.count_misc AS io_misc_requests, - sys.format_time(fsbi.sum_timer_misc) AS io_misc_latency, + format_pico_time(fsbi.sum_timer_misc) AS io_misc_latency, sys.format_bytes(ibp.allocated) AS innodb_buffer_allocated, sys.format_bytes(ibp.data) AS innodb_buffer_data, sys.format_bytes(ibp.allocated - ibp.data) AS innodb_buffer_free, diff --git a/scripts/sys_schema/views/p_s/schema_tables_with_full_table_scans.sql b/scripts/sys_schema/views/p_s/schema_tables_with_full_table_scans.sql index 6199d244dd2..5d7c898f5ec 100644 --- a/scripts/sys_schema/views/p_s/schema_tables_with_full_table_scans.sql +++ b/scripts/sys_schema/views/p_s/schema_tables_with_full_table_scans.sql @@ -44,7 +44,7 @@ VIEW schema_tables_with_full_table_scans ( SELECT object_schema, object_name, count_read AS rows_full_scanned, - sys.format_time(sum_timer_wait) AS latency + format_pico_time(sum_timer_wait) AS latency FROM performance_schema.table_io_waits_summary_by_index_usage WHERE index_name IS NULL AND count_read > 0 diff --git a/scripts/sys_schema/views/p_s/statement_analysis.sql b/scripts/sys_schema/views/p_s/statement_analysis.sql index 0d9c9cef32c..c1853311adf 100644 --- a/scripts/sys_schema/views/p_s/statement_analysis.sql +++ b/scripts/sys_schema/views/p_s/statement_analysis.sql @@ -82,10 +82,10 @@ SELECT sys.format_statement(DIGEST_TEXT) AS query, COUNT_STAR AS exec_count, SUM_ERRORS AS err_count, SUM_WARNINGS AS warn_count, - sys.format_time(SUM_TIMER_WAIT) AS total_latency, - sys.format_time(MAX_TIMER_WAIT) AS max_latency, - sys.format_time(AVG_TIMER_WAIT) AS avg_latency, - sys.format_time(SUM_LOCK_TIME) AS lock_latency, + format_pico_time(SUM_TIMER_WAIT) AS total_latency, + format_pico_time(MAX_TIMER_WAIT) AS max_latency, + format_pico_time(AVG_TIMER_WAIT) AS avg_latency, + format_pico_time(SUM_LOCK_TIME) AS lock_latency, SUM_ROWS_SENT AS rows_sent, ROUND(IFNULL(SUM_ROWS_SENT / NULLIF(COUNT_STAR, 0), 0)) AS rows_sent_avg, SUM_ROWS_EXAMINED AS rows_examined, diff --git a/scripts/sys_schema/views/p_s/statements_with_full_table_scans.sql b/scripts/sys_schema/views/p_s/statements_with_full_table_scans.sql index 842173645f5..820a5a9c11c 100644 --- a/scripts/sys_schema/views/p_s/statements_with_full_table_scans.sql +++ b/scripts/sys_schema/views/p_s/statements_with_full_table_scans.sql @@ -64,7 +64,7 @@ VIEW statements_with_full_table_scans ( SELECT sys.format_statement(DIGEST_TEXT) AS query, SCHEMA_NAME as db, COUNT_STAR AS exec_count, - sys.format_time(SUM_TIMER_WAIT) AS total_latency, + format_pico_time(SUM_TIMER_WAIT) AS total_latency, SUM_NO_INDEX_USED AS no_index_used_count, SUM_NO_GOOD_INDEX_USED AS no_good_index_used_count, ROUND(IFNULL(SUM_NO_INDEX_USED / NULLIF(COUNT_STAR, 0), 0) * 100) AS no_index_used_pct, diff --git a/scripts/sys_schema/views/p_s/statements_with_runtimes_in_95th_percentile.sql b/scripts/sys_schema/views/p_s/statements_with_runtimes_in_95th_percentile.sql index 6e2489ed84c..51c5e0b1028 100644 --- a/scripts/sys_schema/views/p_s/statements_with_runtimes_in_95th_percentile.sql +++ b/scripts/sys_schema/views/p_s/statements_with_runtimes_in_95th_percentile.sql @@ -58,9 +58,9 @@ SELECT sys.format_statement(DIGEST_TEXT) AS query, COUNT_STAR AS exec_count, SUM_ERRORS AS err_count, SUM_WARNINGS AS warn_count, - sys.format_time(SUM_TIMER_WAIT) AS total_latency, - sys.format_time(MAX_TIMER_WAIT) AS max_latency, - sys.format_time(AVG_TIMER_WAIT) AS avg_latency, + format_pico_time(SUM_TIMER_WAIT) AS total_latency, + format_pico_time(MAX_TIMER_WAIT) AS max_latency, + format_pico_time(AVG_TIMER_WAIT) AS avg_latency, SUM_ROWS_SENT AS rows_sent, ROUND(IFNULL(SUM_ROWS_SENT / NULLIF(COUNT_STAR, 0), 0)) AS rows_sent_avg, SUM_ROWS_EXAMINED AS rows_examined, diff --git a/scripts/sys_schema/views/p_s/statements_with_sorting.sql b/scripts/sys_schema/views/p_s/statements_with_sorting.sql index 0216a12ed4d..a26910a0749 100644 --- a/scripts/sys_schema/views/p_s/statements_with_sorting.sql +++ b/scripts/sys_schema/views/p_s/statements_with_sorting.sql @@ -58,7 +58,7 @@ VIEW statements_with_sorting ( SELECT sys.format_statement(DIGEST_TEXT) AS query, SCHEMA_NAME db, COUNT_STAR AS exec_count, - sys.format_time(SUM_TIMER_WAIT) AS total_latency, + format_pico_time(SUM_TIMER_WAIT) AS total_latency, SUM_SORT_MERGE_PASSES AS sort_merge_passes, ROUND(IFNULL(SUM_SORT_MERGE_PASSES / NULLIF(COUNT_STAR, 0), 0)) AS avg_sort_merges, SUM_SORT_SCAN AS sorts_using_scans, diff --git a/scripts/sys_schema/views/p_s/statements_with_temp_tables.sql b/scripts/sys_schema/views/p_s/statements_with_temp_tables.sql index 3f9dfbc6299..687b303f40e 100644 --- a/scripts/sys_schema/views/p_s/statements_with_temp_tables.sql +++ b/scripts/sys_schema/views/p_s/statements_with_temp_tables.sql @@ -55,7 +55,7 @@ VIEW statements_with_temp_tables ( SELECT sys.format_statement(DIGEST_TEXT) AS query, SCHEMA_NAME as db, COUNT_STAR AS exec_count, - sys.format_time(SUM_TIMER_WAIT) as total_latency, + format_pico_time(SUM_TIMER_WAIT) as total_latency, SUM_CREATED_TMP_TABLES AS memory_tmp_tables, SUM_CREATED_TMP_DISK_TABLES AS disk_tmp_tables, ROUND(IFNULL(SUM_CREATED_TMP_TABLES / NULLIF(COUNT_STAR, 0), 0)) AS avg_tmp_tables_per_query, diff --git a/scripts/sys_schema/views/p_s/user_summary.sql b/scripts/sys_schema/views/p_s/user_summary.sql index 85f08878972..a0d1e308656 100644 --- a/scripts/sys_schema/views/p_s/user_summary.sql +++ b/scripts/sys_schema/views/p_s/user_summary.sql @@ -46,11 +46,11 @@ VIEW user_summary ( ) AS SELECT IF(accounts.user IS NULL, 'background', accounts.user) AS user, SUM(stmt.total) AS statements, - sys.format_time(SUM(stmt.total_latency)) AS statement_latency, - sys.format_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency, + format_pico_time(SUM(stmt.total_latency)) AS statement_latency, + format_pico_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency, SUM(stmt.full_scans) AS table_scans, SUM(io.ios) AS file_ios, - sys.format_time(SUM(io.io_latency)) AS file_io_latency, + format_pico_time(SUM(io.io_latency)) AS file_io_latency, SUM(accounts.current_connections) AS current_connections, SUM(accounts.total_connections) AS total_connections, COUNT(DISTINCT host) AS unique_hosts diff --git a/scripts/sys_schema/views/p_s/user_summary_57.sql b/scripts/sys_schema/views/p_s/user_summary_57.sql index a3147a17714..07695689f84 100644 --- a/scripts/sys_schema/views/p_s/user_summary_57.sql +++ b/scripts/sys_schema/views/p_s/user_summary_57.sql @@ -49,11 +49,11 @@ VIEW user_summary ( ) AS SELECT IF(accounts.user IS NULL, 'background', accounts.user) AS user, SUM(stmt.total) AS statements, - sys.format_time(SUM(stmt.total_latency)) AS statement_latency, - sys.format_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency, + format_pico_time(SUM(stmt.total_latency)) AS statement_latency, + format_pico_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency, SUM(stmt.full_scans) AS table_scans, SUM(io.ios) AS file_ios, - sys.format_time(SUM(io.io_latency)) AS file_io_latency, + format_pico_time(SUM(io.io_latency)) AS file_io_latency, SUM(accounts.current_connections) AS current_connections, SUM(accounts.total_connections) AS total_connections, COUNT(DISTINCT host) AS unique_hosts, diff --git a/scripts/sys_schema/views/p_s/user_summary_by_file_io.sql b/scripts/sys_schema/views/p_s/user_summary_by_file_io.sql index 85862d50ecd..9afc2028c27 100644 --- a/scripts/sys_schema/views/p_s/user_summary_by_file_io.sql +++ b/scripts/sys_schema/views/p_s/user_summary_by_file_io.sql @@ -40,7 +40,7 @@ VIEW user_summary_by_file_io ( ) AS SELECT IF(user IS NULL, 'background', user) AS user, SUM(count_star) AS ios, - sys.format_time(SUM(sum_timer_wait)) AS io_latency + format_pico_time(SUM(sum_timer_wait)) AS io_latency FROM performance_schema.events_waits_summary_by_user_by_event_name WHERE event_name LIKE 'wait/io/file/%' GROUP BY IF(user IS NULL, 'background', user) diff --git a/scripts/sys_schema/views/p_s/user_summary_by_file_io_type.sql b/scripts/sys_schema/views/p_s/user_summary_by_file_io_type.sql index 37b4b14bc8f..665f65c339b 100644 --- a/scripts/sys_schema/views/p_s/user_summary_by_file_io_type.sql +++ b/scripts/sys_schema/views/p_s/user_summary_by_file_io_type.sql @@ -58,8 +58,8 @@ VIEW user_summary_by_file_io_type ( SELECT IF(user IS NULL, 'background', user) AS user, event_name, count_star AS total, - sys.format_time(sum_timer_wait) AS latency, - sys.format_time(max_timer_wait) AS max_latency + format_pico_time(sum_timer_wait) AS latency, + format_pico_time(max_timer_wait) AS max_latency FROM performance_schema.events_waits_summary_by_user_by_event_name WHERE event_name LIKE 'wait/io/file%' AND count_star > 0 diff --git a/scripts/sys_schema/views/p_s/user_summary_by_stages.sql b/scripts/sys_schema/views/p_s/user_summary_by_stages.sql index ab34a3ee107..8706fe06c95 100644 --- a/scripts/sys_schema/views/p_s/user_summary_by_stages.sql +++ b/scripts/sys_schema/views/p_s/user_summary_by_stages.sql @@ -57,8 +57,8 @@ VIEW user_summary_by_stages ( SELECT IF(user IS NULL, 'background', user) AS user, event_name, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(avg_timer_wait) AS avg_latency + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(avg_timer_wait) AS avg_latency FROM performance_schema.events_stages_summary_by_user_by_event_name WHERE sum_timer_wait != 0 ORDER BY user, sum_timer_wait DESC; diff --git a/scripts/sys_schema/views/p_s/user_summary_by_statement_latency.sql b/scripts/sys_schema/views/p_s/user_summary_by_statement_latency.sql index 2c6e0b50ccf..a07989a4ad6 100644 --- a/scripts/sys_schema/views/p_s/user_summary_by_statement_latency.sql +++ b/scripts/sys_schema/views/p_s/user_summary_by_statement_latency.sql @@ -45,9 +45,9 @@ VIEW user_summary_by_statement_latency ( ) AS SELECT IF(user IS NULL, 'background', user) AS user, SUM(count_star) AS total, - sys.format_time(SUM(sum_timer_wait)) AS total_latency, - sys.format_time(SUM(max_timer_wait)) AS max_latency, - sys.format_time(SUM(sum_lock_time)) AS lock_latency, + format_pico_time(SUM(sum_timer_wait)) AS total_latency, + format_pico_time(SUM(max_timer_wait)) AS max_latency, + format_pico_time(SUM(sum_lock_time)) AS lock_latency, SUM(sum_rows_sent) AS rows_sent, SUM(sum_rows_examined) AS rows_examined, SUM(sum_rows_affected) AS rows_affected, diff --git a/scripts/sys_schema/views/p_s/user_summary_by_statement_type.sql b/scripts/sys_schema/views/p_s/user_summary_by_statement_type.sql index f9ddc2bb4ff..f5a3cfc94cd 100644 --- a/scripts/sys_schema/views/p_s/user_summary_by_statement_type.sql +++ b/scripts/sys_schema/views/p_s/user_summary_by_statement_type.sql @@ -52,9 +52,9 @@ VIEW user_summary_by_statement_type ( SELECT IF(user IS NULL, 'background', user) AS user, SUBSTRING_INDEX(event_name, '/', -1) AS statement, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(max_timer_wait) AS max_latency, - sys.format_time(sum_lock_time) AS lock_latency, + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(max_timer_wait) AS max_latency, + format_pico_time(sum_lock_time) AS lock_latency, sum_rows_sent AS rows_sent, sum_rows_examined AS rows_examined, sum_rows_affected AS rows_affected, diff --git a/scripts/sys_schema/views/p_s/wait_classes_global_by_avg_latency.sql b/scripts/sys_schema/views/p_s/wait_classes_global_by_avg_latency.sql index faee58230a9..b707eb27b6c 100644 --- a/scripts/sys_schema/views/p_s/wait_classes_global_by_avg_latency.sql +++ b/scripts/sys_schema/views/p_s/wait_classes_global_by_avg_latency.sql @@ -45,10 +45,10 @@ VIEW wait_classes_global_by_avg_latency ( ) AS SELECT SUBSTRING_INDEX(event_name,'/', 3) AS event_class, SUM(COUNT_STAR) AS total, - sys.format_time(CAST(SUM(sum_timer_wait) AS UNSIGNED)) AS total_latency, - sys.format_time(MIN(min_timer_wait)) AS min_latency, - sys.format_time(IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0)) AS avg_latency, - sys.format_time(CAST(MAX(max_timer_wait) AS UNSIGNED)) AS max_latency + format_pico_time(CAST(SUM(sum_timer_wait) AS UNSIGNED)) AS total_latency, + format_pico_time(MIN(min_timer_wait)) AS min_latency, + format_pico_time(IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0)) AS avg_latency, + format_pico_time(CAST(MAX(max_timer_wait) AS UNSIGNED)) AS max_latency FROM performance_schema.events_waits_summary_global_by_event_name WHERE sum_timer_wait > 0 AND event_name != 'idle' diff --git a/scripts/sys_schema/views/p_s/wait_classes_global_by_latency.sql b/scripts/sys_schema/views/p_s/wait_classes_global_by_latency.sql index 5675c3f589a..c89bf46e6de 100644 --- a/scripts/sys_schema/views/p_s/wait_classes_global_by_latency.sql +++ b/scripts/sys_schema/views/p_s/wait_classes_global_by_latency.sql @@ -45,10 +45,10 @@ VIEW wait_classes_global_by_latency ( ) AS SELECT SUBSTRING_INDEX(event_name,'/', 3) AS event_class, SUM(COUNT_STAR) AS total, - sys.format_time(SUM(sum_timer_wait)) AS total_latency, - sys.format_time(MIN(min_timer_wait)) min_latency, - sys.format_time(IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0)) AS avg_latency, - sys.format_time(MAX(max_timer_wait)) AS max_latency + format_pico_time(SUM(sum_timer_wait)) AS total_latency, + format_pico_time(MIN(min_timer_wait)) min_latency, + format_pico_time(IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0)) AS avg_latency, + format_pico_time(MAX(max_timer_wait)) AS max_latency FROM performance_schema.events_waits_summary_global_by_event_name WHERE sum_timer_wait > 0 AND event_name != 'idle' diff --git a/scripts/sys_schema/views/p_s/waits_by_host_by_latency.sql b/scripts/sys_schema/views/p_s/waits_by_host_by_latency.sql index 5587fee210f..2ddad55d4e1 100644 --- a/scripts/sys_schema/views/p_s/waits_by_host_by_latency.sql +++ b/scripts/sys_schema/views/p_s/waits_by_host_by_latency.sql @@ -45,9 +45,9 @@ VIEW waits_by_host_by_latency ( SELECT IF(host IS NULL, 'background', host) AS host, event_name AS event, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(avg_timer_wait) AS avg_latency, - sys.format_time(max_timer_wait) AS max_latency + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(avg_timer_wait) AS avg_latency, + format_pico_time(max_timer_wait) AS max_latency FROM performance_schema.events_waits_summary_by_host_by_event_name WHERE event_name != 'idle' AND sum_timer_wait > 0 diff --git a/scripts/sys_schema/views/p_s/waits_by_user_by_latency.sql b/scripts/sys_schema/views/p_s/waits_by_user_by_latency.sql index 5a6a618ecc6..63c71b3e1ae 100644 --- a/scripts/sys_schema/views/p_s/waits_by_user_by_latency.sql +++ b/scripts/sys_schema/views/p_s/waits_by_user_by_latency.sql @@ -55,9 +55,9 @@ VIEW waits_by_user_by_latency ( SELECT IF(user IS NULL, 'background', user) AS user, event_name AS event, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(avg_timer_wait) AS avg_latency, - sys.format_time(max_timer_wait) AS max_latency + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(avg_timer_wait) AS avg_latency, + format_pico_time(max_timer_wait) AS max_latency FROM performance_schema.events_waits_summary_by_user_by_event_name WHERE event_name != 'idle' AND user IS NOT NULL diff --git a/scripts/sys_schema/views/p_s/waits_global_by_latency.sql b/scripts/sys_schema/views/p_s/waits_global_by_latency.sql index a41be3b1448..67b1a533131 100644 --- a/scripts/sys_schema/views/p_s/waits_global_by_latency.sql +++ b/scripts/sys_schema/views/p_s/waits_global_by_latency.sql @@ -43,9 +43,9 @@ VIEW waits_global_by_latency ( ) AS SELECT event_name AS event, count_star AS total, - sys.format_time(sum_timer_wait) AS total_latency, - sys.format_time(avg_timer_wait) AS avg_latency, - sys.format_time(max_timer_wait) AS max_latency + format_pico_time(sum_timer_wait) AS total_latency, + format_pico_time(avg_timer_wait) AS avg_latency, + format_pico_time(max_timer_wait) AS max_latency FROM performance_schema.events_waits_summary_global_by_event_name WHERE event_name != 'idle' AND sum_timer_wait > 0 |