Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit c12e666

Browse files
committed
adding db, first_seen, last_seen
1 parent f28a394 commit c12e666

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

views/p_s/statements_with_runtimes_in_95th_percentile.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ SELECT format_statement(DIGEST_TEXT) AS query,
9696
* mysql> SELECT * FROM statements_with_runtimes_in_95th_percentile_raw LIMIT 1\G
9797
* *************************** 1. row ***************************
9898
* query: SELECT `e` . `round_robin_bin` AS `round1_1706_0_` , `e` . `id` AS `id1706_0_` , `e` . `timestamp` AS `timestamp1706_0_` , `e` . `rxBytes` AS `rxBytes1706_0_` , `e` . `rxPackets` AS `rxPackets1706_0_` , `e` . `rxErrors` AS `rxErrors1706_0_` , `e` . `txBytes` AS `txBytes1706_0_` , `e` . `txPackets` AS `txPackets1706_0_` , `e` . `txErrors` AS `txErrors1706_0_` , `e` . `txCollisions` AS `txColli10_1706_0_` FROM `mem__instruments` . `NetworkTrafficAdvisor_NetworkTraffic` AS `e` JOIN ( SELECT `id` AS `t` , MAX ( TIMESTAMP ) AS `ts` FROM `mem__instruments` . `NetworkTrafficAdvisor_NetworkTraffic` WHERE `id` IN (?) GROUP BY `id` ORDER BY NULL ) `maxes` ON `e` . `id` = `maxes` . `t` AND `e` . `timestamp` = `maxes` . `ts`
99+
* db: mem
99100
* full_scan: *
100101
* exec_count: 14
101102
* err_count: 0
@@ -122,6 +123,7 @@ DROP VIEW IF EXISTS statements_with_runtimes_in_95th_percentile_raw;
122123

123124
CREATE SQL SECURITY INVOKER VIEW statements_with_runtimes_in_95th_percentile_raw AS
124125
SELECT DIGEST_TEXT AS query,
126+
SCHEMA_NAME AS db,
125127
IF(SUM_NO_GOOD_INDEX_USED > 0 OR SUM_NO_INDEX_USED > 0, '*', '') AS full_scan,
126128
COUNT_STAR AS exec_count,
127129
SUM_ERRORS AS err_count,

0 commit comments

Comments
 (0)