Skip to content

Speedup MySQL db access#651

Merged
stephenfin merged 1 commit into
getpatchwork:mainfrom
mchehab:speedup_db
Jun 7, 2026
Merged

Speedup MySQL db access#651
stephenfin merged 1 commit into
getpatchwork:mainfrom
mchehab:speedup_db

Conversation

@mchehab

@mchehab mchehab commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Author: Tales da Aparecida tales.aparecida@redhat.com

models: optimize with_tag_counts using case-when

Leverage PatchTag index replacing the subquery counter with a JOIN.

The current code is too slow on MySQL, as it doesn't use indexes.
The new approach is more direct and allows proper index usage.


NOTE: when applying it, prese preserve the patch's author.

Leverage PatchTag index replacing the subquery counter with a JOIN.

The current code is too slow on MySQL, as it doesn't use indexes.
The new approach is more direct and allows proper index usage.

Signed-off-by: Tales da Aparecida <tales.aparecida@redhat.com>
@stephenfin stephenfin merged commit 52877f8 into getpatchwork:main Jun 7, 2026
11 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