SHOW
Syntax
1191
Profiling is controlled by the
profiling
[483]
session variable, which has a default value of 0 (
OFF
).
Profiling is enabled by setting
profiling
[483]
to 1 or
ON
:
mysql>
SET profiling = 1;
SHOW PROFILES
displays a list of the most recent statements sent to the server. The size of the list is
controlled by the
profiling_history_size
[483]
session variable, which has a default value of 15.
The maximum value is 100. Setting the value to 0 has the practical effect of disabling profiling.
All statements are profiled except
SHOW PROFILE
and
SHOW PROFILES
, so you will find neither of
those statements 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 will show 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.10, “Examining Thread
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)
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...