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

Django

423 readers
1 users here now

Django Project

Django Community

Django Ecosystem

Jobs
Learning/Docs
Podcasts:
Related Fediverse communities
Feeds

founded 1 year ago
MODERATORS
top 4 comments
sorted by: hot top controversial new old
[–] danielquinn@lemmy.ca 7 points 3 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.

[–] refalo@programming.dev 4 points 3 months ago* (last edited 3 months ago)

the simple answer is "because it's different", but there's lots of reasons that may be...

  • kernel version / configuration, including schedulers and power management

  • assuming the same packages are being used, the versions may differ

  • different configurations of those packages between distros

there's probably more.

[–] anzo@programming.dev 2 points 3 months ago

Sorry to doubt you, but are you running the same, really? Even an environmental variable from shell (DEBUG) could have drastic effects (available Traceback stacks)

[–] alexdeathway@programming.dev 0 points 3 months ago

dependency of a dependency.