Hi Florian, On 23 Nov 2014 16:22, "Florian Apolloner" <f.apollo...@gmail.com> wrote: > > Hi Rick, > > > On Sunday, November 23, 2014 1:11:13 PM UTC+1, Rick van Hattem wrote: >> >> If/when an unsliced queryset were to reach a certain limit (say, 10,000, but configurable) the system would raise an error. > > > Django can't know if that would be the case without issuing an extra query -- and even then another transaction might commit a batch operation adding 10k items… >
Actually, it can. If Django limits unsliced queries to 10001 items it can simply raise an error if 10001 items are returned. >> - Protects servers from going down due to memory constraints. > > > Not really, cause psycopg already fetched everything. Not if Django limits it by default :) >> So please, can anyone give a good argument as to why any sane person would have a problem with a huge default limit which will kill the performance of your site anyhow but isn't enough to kill the entire system? > > > There are way easier ways to kill the performance of your site than fetching a few rows, an arbitrary limit on queries is not going to fix anything. Code applications defensively and don't use 3rd party stuff without introspecting it for problems first. While you are right that there are issues in theory, I think in practice they can be worked around easily and don't cause any real problem. Killing a VPS due to out of memory conditions can happen all the time -- be it the database or a service gone rogue or whatever -- but in the end I've rarely seen Django to be the cause of that. In that case you are lucky. I've seen in over half a dozen different projects (which I didn't write myself so couldn't set up properly) problems like these. Even the batch job argument has flaws imho, in the case of batch jobs it's still not a good idea to fetch everything in one big go. But if that would be the case, within Django a view is easily distinguishable from batch jobs so that doesn't have to be a problem. But the hostility against the ideas alone make me lose hope that anything will ever be merged in. It's too bad that people always assume full control over projects. If you're hired to fix problems you can't fix design flaws that easily. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJAwA%3Dw%2Bo9VwsZ85ycxmqjKSzjm57VJOrqkoJxxGORJXnFVe7w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.