{ 'version': 1, 'handlers': { 'debug_console': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', } }, 'loggers': { 'django.db.backends': { 'level': 'DEBUG', 'handlers': ['debug_console'], } } } Using breakpoint in pymysql source Set breakpoint at pymysql/connections.py:_execute_command You can watch all command including row level command. eg) SET AUTOCOMMIT, COMMIT You cannot watch "SET AUTOCOMMIT", "COMMIT" using django.db.backends logger Using Newrelic APM Databases Using Monyog Query analyzer QUERY ANALYSIS MODE with Sniffer Using performance schema settings.py