How can I use the statistics of all queries performed in MySQL flexible server ?

안예리 41 Reputation points
2022-10-12T09:12:06.177+00:00

Hello.

I am using Azure Database for MySQL flexible server.
I would like to monitor the statistics (time of execution, I/O, etc.) of all queries performed in MySQL DBMS.

Installed MySQL Server, the query was saved when the performance_schema server parameter was turned on. However, it does not work in MySQL flexible server, and there is no user permission.

NAME |ENABLED|

--------------------------------
+-------+
events_stages_current |NO |
events_stages_history |NO |
events_stages_history_long |NO |
events_statements_cpu |NO |
events_statements_current |NO |
events_statements_history |NO |
events_statements_history_long |NO |
events_transactions_current |NO |
events_transactions_history |NO |
events_transactions_history_long|NO |
events_waits_current |NO |
events_waits_history |NO |
events_waits_history_long |NO |
global_instrumentation |NO |
thread_instrumentation |NO |
statements_digest |NO |

However, the Azure Database for MySQL - Single Server service has a Query Store.
It is described in the page below.
https://learn.microsoft.com/en-us/azure/mysql/single-server/concepts-performance-recommendations

Question number one:
Is the Query Store function also in MySQL flexible server?

Question number two:
is it possible to update the performance_schema.setup_consumers table so that the query is saved by setting it to performance_schema on?

If there is no both, does it not provide the function to store all query statistics (as well as slow queries) performed?

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
992 questions
{count} votes

Accepted answer
  1. SSingh-MSFT 16,371 Reputation points Moderator
    2022-10-20T07:52:22.757+00:00

    Hi @ 72729183 ,

    Thanks for your patience.

    I have checked with the internal team and got below reply on the questions asked:

    Question 1:
    Is the Query Store function also in MySQL flexible server?

    Currently Query Store function is not available in Flexible Server and not planned very soon

    Question 2:
    is it possible to update the performance_schema.setup_consumers table so that the query is saved by setting it to performance_schema on?
    If there is no both, does it not provide the function to store all query statistics (as well as slow queries) performed?

    Updating performance_schema.setup_instruments is not enabled, we can use Slow query log for query performance details.

    tutorial-query-performance-insights

    how-to-server-logs-portal

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.