0

My website AdminPanel has a PHP file which takes almost 30-40 seconds in loading. I doubt the queries which are making the mess, but may be it is the code but the code structure seems perfect. I want to find and check the all the queries execution and running time i.e how much time it takes to execute? But i can't.

I tried the slow query logs option but it is not logging anything. And from the general log i just see queries but no execution time and details.

Thanks

1

SET GLOBAL long_query_time = 1; to log slow queries taking 1 second or more.

EXPLAIN EXTENDED SELECT ..... to see valuable information about how the query is getting to the result.

Follow immediately in the same session, SHOW WARNINGS; to see how the Optimizer rearranged the sequence of events.
(Rick James, thanks for the reminder.)

  • (And SHOW WARNINGS; so you can see the "extended" stuff.) – Rick James Sep 13 '17 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.