Skip to content

Fix n+1 warning on filters endpoint#1631

Merged
jb3 merged 1 commit into
mainfrom
filter-n+1-warning
Jul 5, 2026
Merged

Fix n+1 warning on filters endpoint#1631
jb3 merged 1 commit into
mainfrom
filter-n+1-warning

Conversation

@ChrisLovering

Copy link
Copy Markdown
Member

The FilterListSerializer serializes each list's nested filters, so listing filter lists issued a separate SELECT ... FROM api_filter per list. Adding prefetch_related batches all filter rows into a single additional query

The FilterListSerializer serializes each list's nested filters, so listing filter lists issued a separate SELECT ... FROM api_filter per list. Adding prefetch_related batches all filter rows into a single additional query
@ChrisLovering ChrisLovering requested review from jb3 and jchristgit July 5, 2026 22:01
@netlify

netlify Bot commented Jul 5, 2026

Copy link
Copy Markdown

Deploy Preview for pydis-static ready!

Name Link
🔨 Latest commit 60d3d36
🔍 Latest deploy log https://app.netlify.com/projects/pydis-static/deploys/6a4ad43a3897760008685fff
😎 Deploy Preview https://deploy-preview-1631--pydis-static.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — filter-n+1-warning into main

@jb3 jb3 merged commit 1f60ec8 into main Jul 5, 2026
11 checks passed
@jb3 jb3 deleted the filter-n+1-warning branch July 5, 2026 22:08
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