Elektrine lite

← Feed

@cjwatson@mastodon.ie

Post #2847215

2026-05-07 18:38 UTC

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)

Replies (1)

  • @diegor@social.gl-como.it 2026-05-08 11:35

    @cjwatson@mastodon.ie You can make tests based on execution time of the query. I usually not try this approch because you probably want some sintetic data so the time is not influenced by data size. I usually prefer a simple test on how much time it take in execution, with a reasonable time limit, just to catch extreme cases. I agree that taking a look at query plan is more deterministic, but still you can have false positive, that you need to evaluete from time to time. Seq scan can be faster than index access, it depends in data size, or result set size.

    Open ##2847216