this post was submitted on 27 Jul 2024
7 points (81.8% liked)

Django

426 readers
1 users here now

Django Project

Django Community

Django Ecosystem

Jobs
Learning/Docs
Podcasts:
Related Fediverse communities
Feeds

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 4 months ago

Django ORM queries should be so fast that any difference between the overlying OS shouldn't have a perceptible effect. If however you're doing a huge number of queries on a single page, or have something custom going on under the hood that runs a query with like, 12 joins, then it could be the fact that postgresql-client in Debian is likely much older than in Ubuntu.

If you're also running PostgreSQL on the same server (not recommended for production!) then the PostgreSQL version will likely be different too.

I'm assuming that you're running the same version of all your Python dependencies in both places. If not, the version of psycopg could have an effect as well.

But seriously, if the difference is noticeable, it's probably none of these things. It's more likely network issues between the different environments. Network lag is a much better candidate for something like this.