ImagesToDelete.objects.create(uid=uid, images=json.dumps(images_names))
this is the main query, images_names has not many data
On every query to db django makes a query before the main query
{‘sql’: ‘SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED’, ‘time’: ‘0.000’}
This line is shown when print(connection.queries)
And this slows down the execution of the request, despite the fact that the SQL query itself has time “time”: “0.000”
And also, with absolutely every connection to the database, the {‘sql’: "\n SELECT VERSION(),\n sql_mode,\n default_storage_engine,\n sql_auto_is_null,\n lower_case_table_names,\n CONVERT_TZ(‘2001-01-01 01:00:00’, ‘UTC’, ‘UTC’) IS NOT NULL\n ", ‘time’: ‘0.000’} query is called
MySQL is used
Is it possible to cancel these first 2 queries when connecting to the database?