Document that SQL logging does not include "framework level" queries
|Reported by:||Brian May||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
As discussed here https://docs.djangoproject.com/en/dev/topics/logging/ django supports logging of raw SQL queries. "For example, every SQL statement executed by a request is logged at the DEBUG level to this logger."
However, at least for mysql, this doesn't include initialization or session management SQL queries.
Using wireshark I see a number of extra queries, that are never logged, like:
SET NAMES utf8 set autocommit=0 SET SQL_AUTO_IS_NULL = 0 set autocommit=1 set autocommit=0 rollback set autocommit=1
I assume "commit" is also on this list, however not part of this test.
Being able to see all the queries is important in order to debug obscure problems.
Change History (6)
comment:2 Changed 3 years ago by
|Component:||Database layer (models, ORM) → Documentation|
|Triage Stage:||Unreviewed → Accepted|
comment:3 Changed 3 years ago by
|Summary:||sql logging incomplete → Document that SQL logging does not include "framework level" queries|