Last active
June 30, 2021 08:39
-
-
Save leofaster/c5acf2fd387f3ee937d73c38271921a2 to your computer and use it in GitHub Desktop.
Count the numbers of hits to database
This file contains 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 | |
print(len(connection.queries)) | |
from django.db import reset_queries | |
reset_queries() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment