Post #2847214
2026-05-07 18:37 UTC
While you can get big improvements here with relatively small changes, it's also easy to introduce problems like this, so ideally I'd have regression tests. Django has QuerySet.explain, so if I set things up right I could assert things about its output, like "no seq scans" or "no nested loops". I imagine I'd use the JSON output format to help with parsing. (2/3)
Replies (1)
-
@cjwatson@mastodon.ie 2026-05-07 18:38
But the results obviously won't be stable across PostgreSQL versions. I don't mind needing to make the odd tweak, but I'd like to understand the scale of changes that we'd be signing up for over time. Are there any good-quality Django applications (it's fine if they're PostgreSQL-specific) that have adopted this testing strategy? If so, I'd like to look at their git history. (3/3)