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

perf(tf): index by the test run group ID #2700

Conversation

mfocko
Copy link
Member

@mfocko mfocko commented Jan 17, 2025

Based on the Sentry's backend insights, it appears that in the last 90d we have spent 16.82min running the query that filters out rows based on the «test run group id», therefore index that column to improve the speed of the queries done.

TODO

The alembic migration generated also:

def upgrade():
    op.alter_column('project_events', 'type',
               existing_type=postgresql.ENUM('pull_request', 'branch_push', 'release', 'issue', 'koji_build_tag', 'anitya_version', 'anitya_multiple_versions', name='projecteventtype'),
               type_=sa.Enum('pull_request', 'branch_push', 'release', 'issue', 'koji_build_tag', 'anitya_version', 'anitya_multiple_versions', name='projecteventmodeltype'),
               existing_nullable=True)


def downgrade():
    op.alter_column('project_events', 'type',
               existing_type=sa.Enum('pull_request', 'branch_push', 'release', 'issue', 'koji_build_tag', 'anitya_version', 'anitya_multiple_versions', name='projecteventmodeltype'),
               type_=postgresql.ENUM('pull_request', 'branch_push', 'release', 'issue', 'koji_build_tag', 'anitya_version', 'anitya_multiple_versions', name='projecteventtype'),
               existing_nullable=True)

which is definitely not my change and is basically just a rename of the enumeration

  • check what is it about

@mfocko mfocko self-assigned this Jan 17, 2025
@mfocko mfocko requested a review from a team as a code owner January 17, 2025 16:14
Copy link
Contributor

Based on the Sentry's backend insights, it appears that in the last 90d
we have spent 16.82min running the query that filters out rows based on
the «test run group id», therefore index that column to improve the speed
of the queries done.

Signed-off-by: Matej Focko <[email protected]>
@mfocko mfocko force-pushed the perf/index-tft_test_run_group_id branch from 2ad7dc0 to c8ed3db Compare January 20, 2025 12:02
Copy link
Contributor

Copy link
Member

@majamassarini majamassarini left a comment

Choose a reason for hiding this comment

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

🙏🏻

Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

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

lgtm!

@mfocko mfocko added the mergeit When set, zuul wil gate and merge the PR. label Jan 20, 2025
Copy link
Contributor

Build succeeded (gate pipeline).
https://softwarefactory-project.io/zuul/t/packit-service/buildset/50f18e417e8c4a9f85febd31fe25025e

✔️ pre-commit SUCCESS in 1m 49s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit cf587c9 into packit:main Jan 20, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants