The previous article introduced two methods to check the running time of MySQL statements. Today, I will continue to introduce you to check the running time of MySQL statements. Interested friends, let’s learn together! Query Profiler is a query diagnostic analysis tool that comes with MYSQL. It can be used to analyze the performance bottleneck of a SQL statement. Usually we use explain and slow query log, but they cannot provide accurate analysis. However, Query Profiler can locate the various resource consumption of a SQL statement, such as CPU, IO, etc., as well as the time consumed by the SQL execution. Show profiles was added after 5.0.37. To use this feature, make sure the version is after 5.0.37. 1. Log in to MySQL to view the database version: View the version: 2. Check whether the profile is enabled. The database is not enabled by default.
You can start executing some SQL statements you want to analyze. 3. After execution, query the SQL execution time: Supplement: show profile cpu, block io, memory, swaps, context switches, source for query 6; you can view the various resource consumption of a SQL statement, such as CPU, IO, etc. This is the end of this article about how to view the execution time of MySQL statements through Query Profiler. For more information about viewing the execution time of MySQL statements, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
>>: Html and CSS Basics (Must Read)
Firewall A firewall is a set of rules. When a pac...
Brief description Suitable for readers: Mobile de...
Today at work, a friend I added temporarily asked ...
Table of contents Preface analyze Data Total Repe...
As we all know, mailto is a very practical HTML ta...
1. Summary: In general, they can be divided into ...
The importance of data consistency and integrity ...
Using c3p0 Import the c3p0jar package <!-- htt...
What I have been learning recently involves knowl...
This article shares the specific code of js to ac...
Passing values between mini program pages Good ...
Definition of Float Sets the element out of the n...
This article shares the specific code of JavaScri...
Before introducing the GROUP BY and HAVING clause...
Achieve results html <div class="containe...