4
I would like to know which are the most offensive queries in my database.
I have already used the conventional methods "Show full processlist" and among others.
4
I would like to know which are the most offensive queries in my database.
I have already used the conventional methods "Show full processlist" and among others.
3
You can make use of the query below:
select * from sys.`x$statement_analysis`
It will bring you information about which query is most executed, latency, average latency, number of times it was executed, affected lines, among a lot of other information.
Remembering that the Mysql server has to be configured to analyze this data.
To enable Mysql Server edit my.cnf file and make sure the settings are as described below:
performance_schema_consumer_events_statements_history_long=ON
performance_schema_consumer_events_statements_history=ON
performance_schema_consumer_events_stages_current=ON
performance_schema_consumer_events_stages_history=ON
performance_schema_consumer_events_stages_history_long=ON
performance_schema_consumer_events_waits_current=ON
performance_schema_consumer_events_waits_history=ON
performance_schema_consumer_events_waits_history_long=ON
performance_schema=ON
performance_schema_instrument='%=ON'
Source: https://runops.wordpress.com/2015/08/12/mysql-performance-schema/
Only as reference: https://runops.wordpress.com/2015/08/12/mysql-performance-schema/ (link in English)
Leonan, in fact I took this query in the own Workbench in the performance area analitics.
The article is only to complement. If you have a time it gives a complement of how to activate, not all server see with this option enabled. Mainly site hosting.
Aah yes thanks :) I thought you said I found there kkk
Browser other questions tagged mysql query
You are not signed in. Login or sign up in order to post.
offending? I’m sorry, I’m not familiar with the term, what does that mean?
– Guilherme Nascimento
Also not familiar with the term @Guilhermenascimento, but I think he meant more "heavy", which consume more processing resources and etc...
– KaduAmaral