I'm optimising my code which was making far too many queries on start.
I'm getting to almost the bare minimum now, and have started coming across the following:
QUERY = 'BEGIN' - PARAMS = ()
This seems to be used almost every single time and practically doubles the number of queries made - but I don't think it is actually doing anything (apart from opening up a connection to the DB and wasting time and CPU).
Can anyone tell me what it is, why it is necessary, and if it isn't, how I can remove it?
I'm viewing my queries using django.db.connection.queries.
Django - 1.8 Python - 3.4 with sqlite as the DB.
Aucun commentaire:
Enregistrer un commentaire