Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.1Mb
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  / ...  / INFORMATION_SCHEMA Tables  / INFORMATION_SCHEMA General Tables  /  The INFORMATION_SCHEMA PROFILING Table

24.3.19 The INFORMATION_SCHEMA PROFILING Table

ThePROFILING table provides statement profiling information. Its contents correspond to the information produced by theSHOW PROFILE andSHOW PROFILES statements (seeSection 13.7.5.30, “SHOW PROFILE Statement”). The table is empty unless theprofiling session variable is set to 1.

Note

This table is deprecated; expect it to be removed in a future release of MySQL. Use thePerformance Schema instead; seeSection 25.19.1, “Query Profiling Using Performance Schema”.

ThePROFILING table has these columns:

  • QUERY_ID

    A numeric statement identifier.

  • SEQ

    A sequence number indicating the display order for rows with the sameQUERY_ID value.

  • STATE

    The profiling state to which the row measurements apply.

  • DURATION

    How long statement execution remained in the given state, in seconds.

  • CPU_USER,CPU_SYSTEM

    User and system CPU use, in seconds.

  • CONTEXT_VOLUNTARY,CONTEXT_INVOLUNTARY

    How many voluntary and involuntary context switches occurred.

  • BLOCK_OPS_IN,BLOCK_OPS_OUT

    The number of block input and output operations.

  • MESSAGES_SENT,MESSAGES_RECEIVED

    The number of communication messages sent and received.

  • PAGE_FAULTS_MAJOR,PAGE_FAULTS_MINOR

    The number of major and minor page faults.

  • SWAPS

    How many swaps occurred.

  • SOURCE_FUNCTION,SOURCE_FILE, andSOURCE_LINE

    Information indicating where in the source code the profiled state executes.

Notes

  • PROFILING is a nonstandardINFORMATION_SCHEMA table.

Profiling information is also available from theSHOW PROFILE andSHOW PROFILES statements. SeeSection 13.7.5.30, “SHOW PROFILE Statement”. For example, the following queries are equivalent:

SHOW PROFILE FOR QUERY 2;SELECT STATE, FORMAT(DURATION, 6) AS DURATIONFROM INFORMATION_SCHEMA.PROFILINGWHERE QUERY_ID = 2 ORDER BY SEQ;