1、show PROFILEs
2、show PROFILE FOR QUERY 67;
3、
SET @query_id := 67;
SELECT
STATE,
SUM(DURATION) AS Total_R,
ROUND(
100 * sum(DURATION) / (
SELECT
sum(DURATION)
FROM
information_schema.PROFILING
WHERE
QUERY_ID =@query_id
),
2
) AS Pct_R,
count(*) AS Calls,
sum(DURATION) / count(*) AS "R/Call"
FROM
information_schema.PROFILING
WHERE
QUERY_ID = @query_id
GROUP BY
STATE
ORDER BY
total_R DESC;
5、SHOW PROFILE cpu for query 67;