• Daniel Quinn
    link
    fedilink
    English
    arrow-up
    7
    ·
    5 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
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    5 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.

  • adr1an@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    5 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)