Skip to content

Commit

Permalink
Merge pull request #637 from liuqian1990/patch-1
Browse files Browse the repository at this point in the history
排除mysql sys系统库
  • Loading branch information
kongfei605 committed Sep 6, 2023
2 parents 4f820cd + bb777cb commit 0b2bbeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inputs/mysql/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ SELECT table_schema, table_name,
IFNULL(index_length,0) AS index_size_bytes,
IFNULL(data_length,0) AS data_size_bytes
FROM information_schema.tables
WHERE table_schema not in ('mysql', 'performance_schema', 'information_schema')`
WHERE table_schema not in ('mysql', 'performance_schema', 'information_schema', 'sys')`

SQL_QUERY_SYSTEM_TABLE_SIZE = `
SELECT table_schema, table_name,
IFNULL(index_length,0) AS index_size_bytes,
IFNULL(data_length,0) AS data_size_bytes
FROM information_schema.tables
WHERE table_schema in ('mysql', 'performance_schema', 'information_schema')`
WHERE table_schema in ('mysql', 'performance_schema', 'information_schema', 'sys')`

SQL_AVG_QUERY_RUN_TIME = `
SELECT schema_name, ROUND((SUM(sum_timer_wait) / SUM(count_star)) / 1000000) AS avg_us
Expand Down

0 comments on commit 0b2bbeb

Please sign in to comment.