Not the answer you need?
Register and ask your own question!
Many Forum changes were implemented on Tue 22 Sep. Read about new Ranks, Scoring, and Reactions.
Email [email protected] for any comments or concerns.

why the query time under long_query_time is logged in slow query log?

justlooksjustlooks ContributorCurrent User Role Beginner
here is content of my.cnf about slow query info

log_slow_queries = ON
log-slow-queries = /var/lib/mysql/slow-queries.log
long_query_time = 10

and here is my slow query log content

# Query_time: 0.000570 Lock_time: 0.000045 Rows_sent: 1 Rows_examined: 460 Rows_affected: 0 Rows_read: 1
# Bytes_sent: 1232 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
SET timestamp=1362638541;
SELECT * FROM toocle_suppliers_cate.regional_s WHERE 1 and cate_id = 1522 limit 1;
# Time: 130307 14:42:25
# [email protected]: xxxx @ [xxxx]
# Thread_id: 32449 Schema: toocle_suppliers_trade Last_errno: 0 Killed: 0
# Query_time: 0.001856 Lock_time: 0.000050 Rows_sent: 1 Rows_examined: 2626 Rows_affected: 0 Rows_read: 1
# Bytes_sent: 1239 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0



and i use percona server 5.5.21-55-log

Comments

  • justlooksjustlooks Contributor Current User Role Beginner
    i checked the query carefully ,and find this query do full table scan(due to few records ,only 3K records in this table),so the server log the query
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.