News for hackers. Stuff that matters.
Re:Ban 1+N in Django by bagels on Sunday March 26, 2023 @11:45PM (#35322639)
Usually it's the wrong pattern, but not always. If you have a very large dataset, it can be beneficial. You can make smaller transactions, smaller query results, and not fill up local memory. For offline backfills, or various reporting jobs this can be the difference between something that works, and something that doesn't.
Re:Ban 1+N in Django by Suor on Sunday March 26, 2023 @11:53PM (#35322678)
For that fetching in chunks is usually a way to go. I use something of these usually https://handy.readthedocs.io/en/latest/db.html#queryset_iter...