-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
docs/design: add design doc for index usage information #20316
Conversation
); | ||
``` | ||
|
||
Because the max length of schema name, table name and index name is 64, so we use `varchar(64)`. The documentation is [here](https://dev.mysql.com/doc/refman/5.7/en/identifier-length.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you change the link to TiDB user doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not find relevant information in TiDB user doc.
Co-authored-by: Zhang Jian <zjsariel@gmail.com>
@rebelice,Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments.You are not a reviewer or committer or co-leader or leader. |
| TABLE_NAME | varchar | Name of the table or view on which the index is defined.| | ||
| INDEX_NAME | varchar | Name of the index.| | ||
| QUERY_COUNT | longlong | Number of the SQL using this index.| | ||
| ROWS_SELECTED| longlong | Number of rows read from the index. We can check the selectivity of the index through `ROWS_READ` / `QUERY_COUNT`.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt that ROWS_READ
/ QUERY_COUNT
means the selectivity of the index.
A QUERY_COUNT
may lead many of ROWS_READ
, ROWS_READ
/ QUERY_COUNT
just means the average fetched rows count of each query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I will change its description.
@rebelice,Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments.You are not a reviewer or committer or co-leader or leader. |
|
||
### SCHEMA_UNUSED_INDEXES | ||
|
||
Due to MySQL compatibility, add the system table `SCHEMA_UNUSED_INDEXES`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MySQL's SCHEMA_UNUSED_INDEXES
is under SYS
database, should we also be compatible with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable. But I think create a SYS
database is a big issue and may need to be discussed as a new, separate matter. What do you think?
@rebelice,Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments.You are not a reviewer or committer or co-leader or leader. |
I'm going to close this PR since it hasn't been updated for a long time. feel free to reopen if you want to continue with it. thank you for your contribution. |
What problem does this PR solve?
Proposed a design doc for index usage information
Issue Number: related to #19209
Release note