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

Add table row count to summary output #64

Merged
merged 16 commits into from
Nov 22, 2024
Merged

Add table row count to summary output #64

merged 16 commits into from
Nov 22, 2024

Conversation

rohit-nayak-ps
Copy link
Contributor

Enhanced summarize

Added a new flag schema-info-path to specify the output of the vt schema command. It updates the table summary with the number of rows per table and adds it to the summary output.

new schema sub-command

Added a vt schema command that takes connection information to a running MySQL instance and gets (for now) the number of rows per table from the information_schema. It outputs a schema info json file for ingestion by summarize.

We will enhance this to get additional info like PKs, indexes, FKs, Column info, Selectivity (in the future) etc.

Miscellaneous

  • Fixed error messages for keys command
  • Adds a usage_count directive which will allow users to specify the number of times a query was called. This is a shortcut to having to specify the same query / query pattern multiple times to simulate real world usage
  • Added sakila related test files

Todos

  • Add test that launches a cluster to test the schema command

@@ -53,9 +54,11 @@ func keysCmd() *cobra.Command {
return cmd
}

const allowedInputTypes = "'sql', 'mysql-log' or 'vtgate-log'"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed the error messages were incomplete, so added this to the PR.

Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
@systay systay merged commit bfe4db4 into main Nov 22, 2024
2 checks passed
@frouioui frouioui deleted the rohit/reference2 branch November 22, 2024 15:35
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

Successfully merging this pull request may close these issues.

2 participants