SHOW Statements All statements are profiled except  SHOW PROFILE  and  SHOW PROFILES , so neither of those statements appears in the profile list. Malformed statements are profiled. For example,  SHOW PROFILING  is an illegal statement, and a syntax error occurs if you try to execute it, but it shows up in the profiling list. SHOW PROFILE  displays detailed information about a single statement. Without the  FOR QUERY  n  clause, the output pertains to the most recently executed statement. If  FOR QUERY  n  is included,  SHOW PROFILE displays information for statement  n . The values of  n  correspond to the  Query_ID  values displayed by SHOW PROFILES . The  LIMIT  row_count  clause may be given to limit the output to  row_count  rows. If  LIMIT  is given, OFFSET  offset  may be added to begin the output  offset  rows into the full set of rows. By default,  SHOW PROFILE  displays  Status  and  Duration  columns. The  Status  values are like the State  values displayed by  SHOW PROCESSLIST , although there might be some minor differences in interpretion for the two statements for some status values (see Section 8.14, “Examining Server Thread (Process) Information” ). Optional  type  values may be specified to display specific additional types of information: • ALL  displays all information • BLOCK IO  displays counts for block input and output operations • CONTEXT SWITCHES  displays counts for voluntary and involuntary context switches • CPU  displays user and system CPU usage times • IPC  displays counts for messages sent and received • MEMORY  is not currently implemented • PAGE FAULTS  displays counts for major and minor page faults • SOURCE  displays the names of functions from the source code, together with the name and line number of the file in which the function occurs • SWAPS  displays swap counts Profiling is enabled per session. When a session ends, its profiling information is lost. mysql>  SELECT @@profiling; +-------------+ | @@profiling | +-------------+ | 0 | +-------------+ 1 row in set (0.00 sec) mysql>  SET profiling = 1; Query OK, 0 rows affected (0.00 sec) mysql>  DROP TABLE IF EXISTS t1; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql>  CREATE TABLE T1 (id INT); Query OK, 0 rows affected (0.01 sec) mysql>  SHOW PROFILES; 2945 +----------+----------+--------------------------+ | Query_ID | Duration | Query | +----------+----------+--------------------------+