[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

slow log issues-

Posted on 2011-04-29
1
Medium Priority
?
496 Views
Last Modified: 2013-12-06
Im trying to to find  slow queries /etc/mysql/my.cnf the configuration- i

log_slow_queries                = /var/log/mysql/mysql-slow.log
long_query_time                 = 1
log-queries-not-using-indexes   = 1
(Im pretty new to DBA) from my understanding after readin about the 1 stands for second and from some reason the results in mysql-slow.log file have query time=0.0008 which for my understanding not suppose to be there.
from my understanding in the slow log file suppse to be queries the the query time that is more than 1 second.
0
Comment
Question by:Nura111
1 Comment
 
LVL 20

Accepted Solution

by:
Muhammad Wasif earned 2000 total points
ID: 35496974
If you only need those queries which are taking 1 or more seconds then disable log-queries-not-using-indexes option. When you have log-queries-not-using-indexes =1, your log will also contains those queries who are not using indexes regardless of seconds mentioned for long_query_time. Comment log-queries-not-using-indexes and restart MySQL.
0

Featured Post

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Curious about the latest ransomware attack? Check out our timeline of events surrounding the spread of this new virus along with tips on how to mitigate the damage.
If you are like me and like multiple layers of protection, read on!
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question