I'm +1 on this. Although, there was a mistake in one of the replies.
Simon's intended behaviour is: DEBUG_SQL_LOG_LIMIT = 200 (logs last 200 queries) DEBUG_SQL_LOG_LIMIT = None (logs all queries) DEBUG_SQL_LOG_LIMIT = 0 (logs nothing) Rob On Apr 19, 8:37 am, Simon Willison <[EMAIL PROTECTED]> wrote: > I've noticed that a LOT of people get bitten by the problem where > every SQL statement is logged if DEBUG=True, resulting in huge memory > consumption after a while. This problem seems particularly common for > import scripts, which are often run in development (hence with DEBUG > on) and can involve thousands of queries. > > Of course, this behaviour is documented... but I think it's reasonable > to expect that many people will miss that part of the docs. > > What do people think of having the debug SQL log limited to only > storing the last N queries, with N set to something sensible like 200 > by default? This behavior could be controlled by a setting so if > people want to log everything they can: > > DEBUG_SQL_LOG_LIMIT = 200 # Set to 0 to disable logging, set to None > for unlimited logging > > This seems to me to be more sensible default behaviour. > > Cheers, > > Simon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---