Skip to content

optimize some queries#2165

Merged
blued-gear merged 4 commits into
mainfrom
fix/query-optimize_magazine_filter
Jul 7, 2026
Merged

optimize some queries#2165
blued-gear merged 4 commits into
mainfrom
fix/query-optimize_magazine_filter

Conversation

@blued-gear

Copy link
Copy Markdown
Collaborator

When joining with JOIN magazine m ON magazine_id = m.id and then filtering by m.id ... Postgres will use an index-lookup on the magazine index instead of just filter by the equal magazine_id which is very inperformant. This PR changes filters to use magazine_id and the like directly in the WHERE clause.

@melroy89 melroy89 added enhancement New feature or request backend Backend related issues and pull requests labels Jul 7, 2026
@blued-gear blued-gear merged commit 5816c80 into main Jul 7, 2026
9 checks passed
@blued-gear blued-gear deleted the fix/query-optimize_magazine_filter branch July 7, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend related issues and pull requests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants