Add INFORMATION_SCHEMA table for time spent in different thread statuses
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Won't Fix
|
Wishlist
|
Unassigned | ||
5.5 |
Triaged
|
Medium
|
Unassigned |
Bug Description
SHOW PROFILES is great, but the most interesting thing is the timing data -- all the un-implemented functionality for other things is not necessary. I also don't like that it uses getrusage() which is inaccurate (only centisecond-level, and implemented by polling) and too expensive.
I propose an INFORMATION_SCHEMA table with global and session counters for the time spent in each thread status. It should also count the number of times that status was entered and exited. This will make it quite obvious when a particular status, such as "Statistics" or "Copying to tmp table," suddenly begins consuming more time than usual, or being entered more than usual. I propose that you should be able to do the following:
SELECT * FROM INFORMATION_
SELECT * FROM INFORMATION_
and you'd get something like this:
+------
| Status | Count_Star | SUM_Time |
+------
| Statistics | 5 | 0.001 |
| Copying to tmp table | 11 | 0.238 |
| Waiting for query cache mutex | 1818 | 58.112 |
+------
This data would also be extremely good for building Cacti graphs!
Related branches
- Vadim Tkachenko: Needs Fixing
- Alexey Kopytov: Pending requested
-
Diff: 695 lines (+691/-0)1 file modifiedpatches/bug589487.patch (+691/-0)
affects: | percona-patches → percona-server |
Changed in percona-server: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
tags: | added: fr |
There is patch from Xiaobin for this feature