Last active
March 25, 2020 19:54
-
-
Save rafaelhenrique/764e43ce2ef0aea1cd7206e04debc443 to your computer and use it in GitHub Desktop.
Measure time of query in Django
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import connection | |
# [... code of query here ...] | |
print(queryset) # querysets needs be used, because this is lazy | |
print(connection.queries) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment