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

Collect all indexes from all tables #51

Closed
debeando opened this issue Sep 15, 2018 · 0 comments
Closed

Collect all indexes from all tables #51

debeando opened this issue Sep 15, 2018 · 0 comments

Comments

@debeando
Copy link
Collaborator

debeando commented Sep 15, 2018

When apply indexes starting from slave, and for another reason have inconsistent index in all slaves, with this feature you can find the difference and them fixed.

The idea is to collect all indexes from all tables to detect with another tool the difference between servers, maybe in the future is possible for columns.

+-------+------------+--------------------+--------------+----------------+...+-------------+...+
| Table | Non_unique | Key_name           | Seq_in_index | Column_name    |...| Cardinality |...|
+-------+------------+--------------------+--------------+----------------+...+-------------+...+
| demo  |          0 | PRIMARY            |            1 | id             |...|      368135 |...|
| demo  |          1 | idx_audit_at       |            1 | created_at     |...|          17 |...|
| demo  |          1 | idx_audit_at       |            2 | deleted_at     |...|       12694 |...|
| demo  |          1 | idx_publication_id |            1 | publication_id |...|       61355 |...|
+-------+------------+--------------------+--------------+----------------+...+-------------+...+

output example:

mysql_indexes{"schema": "test", "table"="demo", "index": "idx_audit_at", "column": "deleted_at"} = 12694
debeando pushed a commit that referenced this issue Sep 17, 2018
debeando pushed a commit that referenced this issue Sep 17, 2018
debeando pushed a commit that referenced this issue Sep 17, 2018
debeando pushed a commit that referenced this issue Sep 17, 2018
#51 - Collect indexes from MySQL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants