Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recording the index usage information and more #14607

Open
winoros opened this issue Feb 3, 2020 · 6 comments
Open

Recording the index usage information and more #14607

winoros opened this issue Feb 3, 2020 · 6 comments
Assignees
Labels
feature/accepted This feature request is accepted by product managers sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement. type/feature-request Categorizes issue or PR as related to a new feature.

Comments

@winoros
Copy link
Member

winoros commented Feb 3, 2020

Feature Request

Is your feature request related to a problem? Please describe:

In SQL Server, there's a view sys.dm_db_index_usage_stats.
In Oracle, there's views V$SEGMENT_STATISTICS and V$OBJECT_USAGE.
These views can capture the usage of index such as how many times this index is used, the last time that this index is used.

Describe the feature you'd like:

Disign a view like them to collect some information help DBA make decisions.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

@winoros
Copy link
Member Author

winoros commented Feb 3, 2020

When you pick up this issue. You should

  • Write a design doc to show how you want to implement this feature.
  • After the design doc is granted by reviewers, you can begin to implement it.

If you're interested in this but have no clear idea to do this. You can join our community slack workspace to get some help.

@wwar
Copy link

wwar commented Feb 21, 2020

In MySQL this is in sys as well: sys.schema_unused_indexes. The underlying views are in performance schema.

@sre-bot sre-bot added feature-request type/feature-request Categorizes issue or PR as related to a new feature. and removed feature-request labels Jun 4, 2020
@qw4990 qw4990 self-assigned this Jul 30, 2020
@qw4990
Copy link
Contributor

qw4990 commented Jul 30, 2020

@rebelice PTAL.

@zz-jason
Copy link
Member

duplicated with #17508

@rebelice
Copy link
Contributor

/assign

@ghost
Copy link

ghost commented Aug 6, 2020

As well as sys.schema_unused_indexes, the forks of MySQL also have this feature in index_statistics / user_statistics etc: https://www.percona.com/doc/percona-server/LATEST/diagnostics/user_stats.html

The advantage of copying one of these two designs, there are tools like percona-toolkit that understand how to read this metadata.

@zz-jason zz-jason added the feature/accepted This feature request is accepted by product managers label Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/accepted This feature request is accepted by product managers sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement. type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

7 participants