[Answered ]-Does django create implicit transaction on first query?

2👍

This is a issolation issue. You can relax to ‘isolation level read commited’ to avoid this behavior. Also, learn about this issolation level implications (phantoms).

To set Read Commited Isolation Level into MySQL for your django project you should set this parameter in settings.py:

DATABASE_OPTIONS = { 
     "init_command": 'SET storage_engine=INNODB,    \
                      SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED', }

Leave a comment