summaryrefslogtreecommitdiff
path: root/scripts/sys_schema/procedures/statement_performance_analyzer.sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2023-03-27 18:50:49 +0200
committerSergei Golubchik <serg@mariadb.org>2023-03-27 21:27:27 +0200
commitc2b69163934016afa4bb3b274cddaacec92fcb61 (patch)
treee626bb791fdfb7438e1bdd340da47970926c95b9 /scripts/sys_schema/procedures/statement_performance_analyzer.sql
parentd9808f79de992964ed802d27984c9031d72e7b9a (diff)
downloadmariadb-git-c2b69163934016afa4bb3b274cddaacec92fcb61.tar.gz
MDEV-19629 post-merge fixesbb-11.0-serg
* it isn't "pfs" function, don't call it Item_func_pfs, don't use item_pfsfunc.* * tests don't depend on performance schema, put in the main suite * inherit from Item_str_ascii_func * use connection collation, not utf8mb3_general_ci * set result length in fix_length_and_dec * do not set maybe_null * use my_snprintf() where possible * don't set m_value.ptr on every invocation * update sys schema to use the format_pico_time() * len must be size_t (compilation error on Windows) * the correct function name for double->double is fabs() * drop volatile hack
Diffstat (limited to 'scripts/sys_schema/procedures/statement_performance_analyzer.sql')
-rw-r--r--scripts/sys_schema/procedures/statement_performance_analyzer.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/sys_schema/procedures/statement_performance_analyzer.sql b/scripts/sys_schema/procedures/statement_performance_analyzer.sql
index f98596ef913..3c26fd0b812 100644
--- a/scripts/sys_schema/procedures/statement_performance_analyzer.sql
+++ b/scripts/sys_schema/procedures/statement_performance_analyzer.sql
@@ -196,8 +196,8 @@ CREATE DEFINER='mariadb.sys'@'localhost' PROCEDURE statement_performance_analyze
-> 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,
- -> 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,
-> ROUND(IFNULL(SUM_ROWS_SENT / NULLIF(COUNT_STAR, 0), 0)) AS rows_sent_avg,
-> ROUND(IFNULL(SUM_ROWS_EXAMINED / NULLIF(COUNT_STAR, 0), 0)) AS rows_examined_avg,
-> ROUND(IFNULL(SUM_ROWS_AFFECTED / NULLIF(COUNT_STAR, 0), 0)) AS rows_affected_avg,
@@ -720,4 +720,4 @@ HAVING percentile > 0.95
END IF;
END$$
-DELIMITER ; \ No newline at end of file
+DELIMITER ;