Examples for business, study, careers, love, and more...
Examples :: MYSQL Examples :: Example of Show Profiles Mysql Statement

Example of Show Profiles Mysql Statement:

SELECT @@profiling;
SET profiling = 1;
DROP TABLE IF EXISTS t1;
CREATE TABLE T1 (id INT);
SHOW PROFILES;
SHOW PROFILE FOR QUERY 1;
SHOW PROFILE CPU FOR QUERY 2;
SHOW PROFILE FOR QUERY 2;

Example of Mysql Show Profiles


SHOW PROFILE [type [, type] ... ]
[FOR QUERY n]
[LIMIT row_count [OFFSET offset]]

type:
ALL
| BLOCK IO
| CONTEXT SWITCHES
| CPU
| IPC
| MEMORY
| PAGE FAULTS
| SOURCE
| SWAPS