Userstats to capture how many bytes of an index has been used
Bug #483249 reported by
Ryan Lowe
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Won't Fix
|
Wishlist
|
Oleg Tsarev | ||
Percona patches |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
Say I have the following table:
CREATE TABLE `t1` (
`id` int unsigned NOT NULL auto_increment PRIMARY KEY,
`c1` int,
`c2` int,
`c3` int,
INDEX `idx1` (`c3`,`c2`,`c1`)
);
And I issue the following query:
SELECT `id` FROM `t1` WHERE `c3`=6;
This will show that the index has been used, but what I want to know is how many bytes were used. This way I can not only drop unused indexes, but also shorten indexes that include too many columns.
Changed in percona-patches: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Yasufumi Kinoshita (yasufumi-kinoshita) |
Changed in percona-patches: | |
milestone: | none → 5.1.43 |
tags: | added: userstats |
Changed in percona-server: | |
status: | Triaged → Won't Fix |
assignee: | nobody → Oleg Tsarev (tsarev) |
To post a comment you must log in.
Sorry, I don't catch up with your intention of "how many bytes were used" of index....
Do you want each read/write access to the index pages in buffer pool?
e.g.)
root page: scan page_no to find page_no of the leaf pages 8+8+8+...
branch page: scan page_no to find page_no of the next pages 8+8+8+...
....
leaf page: scan rec and read it 8+8+....40
I don't want such slower and big patch to InnoDB/MyISAM.....
And I don't think "how many bytes were used" are useful...