MySQL Internals Manual  /  Tracing the Optimizer  /  Typical Usage

8.1 Typical Usage

# Turn tracing on (it's off by default):
SET optimizer_trace="enabled=on";
SELECT ...; # your query here
# possibly more queries...
# When done with tracing, disable it:
SET optimizer_trace="enabled=off";

A session can trace only statements which it executes; it cannot see a trace of another session.

Download this Manual
EPUB - 0.8Mb
User Comments
Sign Up Login You must be logged in to post a comment.