Document that SQL logging does not include "framework level" queries
|Reported by:||brian||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:1 Changed 23 months ago by timo
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 22 months ago by aaugustin
- Component changed from Database layer (models, ORM) to Documentation
- Triage Stage changed from Unreviewed to Accepted
comment:3 Changed 22 months ago by timo
- Has patch set
- Summary changed from sql logging incomplete to Document that SQL logging does not include "framework level" queries
Changed 22 months ago by timo
comment:4 Changed 21 months ago by Tim Graham <timograham@…>
- Resolution set to fixed
- Status changed from new to closed