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

Optimize getting counts of transaction items #1778

Merged

Conversation

kontura
Copy link
Contributor

@kontura kontura commented Oct 17, 2024

Previously during history list we separately fetched all transaction packages, groups and environments only to count them. This could be quite slow because it resulted in a lot of separate DB connections.

Now we fetch only the counts and use only one DB connection. To maintain compatibility the counts are passed as an optional parameter and if missing we fallback to the old (slow) computation.

@jan-kolarik
Copy link
Member

Related BZ ticket: https://bugzilla.redhat.com/show_bug.cgi?id=2315665.

@jan-kolarik jan-kolarik self-assigned this Oct 21, 2024
Previously during `history list` we separately fetched all transaction
packages, groups and environments only to count them. This could be
quite slow because it resulted in a lot of separate DB connections.

Now we fetch only the counts and use only one DB connection.
Copy link
Member

@jan-kolarik jan-kolarik left a comment

Choose a reason for hiding this comment

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

Thank you!

@jan-kolarik jan-kolarik added this pull request to the merge queue Oct 24, 2024
Merged via the queue into rpm-software-management:main with commit f1e8d1b Oct 24, 2024
20 checks 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.

2 participants