Enable the slow query record function. Next, let's analyze the content of the slow query:
Select count (distinct. name) from cp_paycard as a left join cp_reservation as B on. uid = B. UID where. type = 2 and B. cpparkid = '000000' and B. businesstype in (2013) and validenddate> '2017-07-05 23:59:59 ';
# User @ host: Root [root] @ localhost [127.0.0.1]
# Query_time: 0 lock_time: 0 rows_sent: 1 rows_examined: 275
D: \ appserv \ mysql \ bin \ mysqld-nt, version: 5.0.45-Community-NT-log (MySQL Community edition (GPL). Started:
TCP/IP Port: 3306, named pipe: (null)
Time id command argument
# Time: 130705 11:17:32
# User @ host: Root [root] @ localhost [127.0.0.1]
# Query_time: 0 lock_time: 0 rows_sent: 1 rows_examined: 6
Use 51 Park;
Select nextrun from uchome_cron where available> '0' order by nextrun limit 1;
# User @ host: Root [root] @ localhost [127.0.0.1]
# Query_time: 0 lock_time: 0 rows_sent: 144 rows_examined: 144
Select * From uchome_config;
# User @ host: Root [root] @ localhost [127.0.0.1]
# Query_time: 0 lock_time: 0 rows_sent: 1 rows_examined: 275
[Description]
Queries Total: Total number of queries unique: Number of SQL statements after deduplication
Sorted by: sorts the output report content
The most important slow SQL statement statistics, including average execution time, lock wait time, total number of result rows, and total number of scanned rows.
Count, the number of SQL executions and percentage of the total slow log count.
Time, execution time, including the total time, average time, minimum, maximum time, and time as a percentage of the total slow SQL time.
95% of time removes the fastest and slowest SQL statements, and the SQL Execution time with a coverage rate of 95%.
Lock time, the waiting time.
95% of lock, 95% of slow SQL wait lock time.
Rows sent, the number of result rows, including average, minimum, and maximum.
Rows examined: number of rows scanned.
Database, which database belongs
Users, which user and IP address account for the percentage of SQL statements executed by all users
Query Abstract: Abstract SQL statement
Query sample, SQL statement