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

Analyze transactions in query log #63

Merged
merged 24 commits into from
Nov 26, 2024
Merged

Analyze transactions in query log #63

merged 24 commits into from
Nov 26, 2024

Conversation

systay
Copy link
Contributor

@systay systay commented Nov 19, 2024

VT Transactions

The vt transactions command is a sub-command of the vt toolset, designed to analyze query logs, identify transaction patterns, and produce a JSON report summarizing these patterns.

This tool is particularly useful for understanding complex transaction behaviors, optimizing database performance, choosing sharding strategy, and auditing transactional queries.

The JSON output can then be used by summarize to include these queries in the report.

systay and others added 5 commits November 19, 2024 17:43
@systay systay marked this pull request as ready for review November 25, 2024 14:52
Signed-off-by: Andres Taylor <[email protected]>
s.run(os.Stdout, cfg)
}

func getAutocommitStatus(set *sqlparser.Set, oldState bool) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can potentially get set @@session.autocommit=1 (or set global autocommit = 1). Does the sqlparser handle this so that expr.Var.Name is autocommit without the scope?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I added unit tests to show that any way to write it is acceptable.

go/transactions/transactions.go Show resolved Hide resolved
@systay systay merged commit d4506d4 into vitessio:main Nov 26, 2024
1 check passed
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.

3 participants