From 13d72a23cc733e062d79207012f8bab447d2427d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Gagn=C3=A9?= Date: Tue, 13 Jan 2026 17:00:36 -0500 Subject: [PATCH 1/3] Remove ps schema prefix in query, 1 of N. Query simplified: SELECT VARIABLE_NAME, VARIABLE_VALUE FROM performance_schema.global_variables --- global/variables.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global/variables.go b/global/variables.go index 4ce7e6d..d6aff6c 100644 --- a/global/variables.go +++ b/global/variables.go @@ -10,7 +10,7 @@ import ( const ( informationSchemaGlobalVariables = "INFORMATION_SCHEMA.GLOBAL_VARIABLES" - performanceSchemaGlobalVariables = "performance_schema.global_variables" + performanceSchemaGlobalVariables = "global_variables" // no need to prefix the table with the ps schema, this is the default schema. ) // may be modified by usePerformanceSchema() From c64440d1be287db88b1001a7630d7a6182daae1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Gagn=C3=A9?= Date: Tue, 13 Jan 2026 17:21:40 -0500 Subject: [PATCH 2/3] Remove ps schema prefix in query, 2 of N. Query simplified: SELECT 1 FROM performance_schema.events_stages_summary_global_by_event_name LIMIT 1 SELECT 1 FROM performance_schema.memory_summary_global_by_event_name LIMIT 1 SELECT 1 FROM performance_schema.table_io_waits_summary_by_table LIMIT 1 SELECT 1 FROM performance_schema.file_summary_by_instance LIMIT 1 SELECT 1 FROM performance_schema.table_lock_waits_summary_by_table LIMIT 1 SELECT 1 FROM performance_schema.events_waits_summary_global_by_event_name LIMIT 1 --- view/access_info.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/view/access_info.go b/view/access_info.go index 85f1234..7c6a5df 100644 --- a/view/access_info.go +++ b/view/access_info.go @@ -23,6 +23,10 @@ func NewAccessInfo(database, table string) AccessInfo { // Name returns the fully qualified table name func (ta AccessInfo) Name() string { + if ta.Database == "performance_schema" && len(ta.Table) > 0 { + // no need to prefix the table with the ps schema, this is the default schema. + return ta.Table + } if len(ta.Database) > 0 && len(ta.Table) > 0 { return ta.Database + "." + ta.Table } From 988f5891a8fbf145b1ed058dd8edf6051740c081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Gagn=C3=A9?= Date: Tue, 13 Jan 2026 17:26:49 -0500 Subject: [PATCH 3/3] Remove ps schema prefix in query, 3 of 3. Query simplified: ELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME = ? --- global/status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global/status.go b/global/status.go index 498281e..9e7137e 100644 --- a/global/status.go +++ b/global/status.go @@ -9,7 +9,7 @@ import ( const ( informationSchemaGlobalStatus = "INFORMATION_SCHEMA.GLOBAL_STATUS" - performanceSchemaGlobalStatus = "performance_schema.global_status" + performanceSchemaGlobalStatus = "global_status" // no need to prefix the table with the ps schema, this is the default schema. ) // may be modified by usePerformanceSchema()