Getting Below query in PMM QAN. its taking load on database. how can i disable this and its shows from database (n/a). what does it mean database n/a.? can someone help me to disable this query? and what is the impact of disalbe of this query?
SELECT
t
.table_schema
,
t
.table_name
,
COLUMN_NAME,
AUTO_INCREMENT,
pow
(
?,
CASE
data_type
WHEN ? THEN ?
WHEN ? THEN ?
WHEN ? THEN ?
WHEN ? THEN ?
WHEN ? THEN ?
END + (column_type
LIKE ?)
) - ? AS max_int
FROM
information_schema
.columns
c
STRAIGHT_JOIN information_schema
.tables
t
ON BINARY t
.table_schema
= c
.table_schema
AND BINARY t
.table_name
= c
.table_name
WHERE
c
.extra
= ?
AND t
.auto_increment
IS NOT NULL.
Hi @Pavanmysql
Please see the “Schema” filter to detect what Schema this query belongs to (there is confusion between Schema and Database in MySQL and PostgreSQL usage)
From what I can see: it’s probably the number of Tables in some schema causing this problem. Try to add the MySQL with --disable-tablestats
flag to pmm, which will stop pmm from collecting such metrics.
2 Likes
Hi @Pavanmysql,
Refer to this documentation page. The query comes from table statistics usage and you can disable it by following the instructions there.
In general, the “?” refers to the fingerprint process and are values are generalised for representation. Similarly, when there is no default database, I believe, you’re seeing “N/A”
Thanks,
K
1 Like
Thanks for the update. @kedarpercona so as per the document i need to remove and add node again in pmm , right?
@kedarpercona @Roma_Novikov
i removed the mysql node and added again in PMM using below command.
root# pmm-admin add mysql --disable-tablestats vm-mysql1-prod-sa --username=pmm --password=*** --query-source=perfschema 127.0.0.1:13306
MySQL Service added.
Service ID : /service_id/8cc0d21b-15e3-4c0e-ab74-defeb3e8a049
Service name: ******
Table statistics collection disabled (always).
i have checked QAN after 1 hour of reconfiguration for last 5 min and 15 min and i m still seeing this query in QAN and its comming from schema n/a and node name (that i reconfigured).
how to fix this or i m missing something?
i disabled the table stats and restart the pmm-server but still this query executing in database.
solved. upgraded pmm server and pmm client with dislabe tablestats. thanks all
1 Like