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)
1》Be good at web design 2》Know how to design web p...
#!/bin/bash #Download SVN yum -y install subversi...
This article summarizes the notes for installing ...
Table of contents frame First-class error reporti...
1. Linux installation (root user operation) 1. In...
<br />In the field of network design, resear...
Frameset pages are somewhat different from ordina...
Operation effect html <head> <meta chars...
This article shares the specific code for JavaScr...
tomcat official website tomcat is equivalent to a...
The concept of relative path Use the current file...
Part 1 Overview of SSH Port Forwarding When you a...
Table of contents Effect display Component Settin...
This article shares the specific code of js+Html ...
Main library binlog: # at 2420 #170809 17:16:20 s...