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)
Today I designed a dynamic window style for publis...
Table of contents Preface start A little thought ...
Table of contents Preface 1. Install scp2 2. Conf...
Note: The third method is only used in XSell and ...
1. Background The following two problems are enco...
Large Text Data Types in Oracle Clob long text ty...
Table of contents 1. Parent component passes valu...
Docker-compose deploys gitlab 1. Install Docker I...
1. Download nginx [root@localhost my.Shells]# doc...
environment Hostname ip address Serve Jenkins 192...
0x0 Test Environment The headquarters production ...
Written in front: Sometimes you may need to view ...
This article shares the specific code of JavaScri...
Preface After the project is migrated to .net cor...
1. Introduction MySQL locks can be divided into g...