Skip to content

Commit 42d7dde

Browse files
committed
Merge pull request #323 from mattrobenolt/explain-analyze
Add EXPLAIN ANALYZE for Postgres
2 parents 47b95b4 + 1c30bc0 commit 42d7dde

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

debug_toolbar/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ def sql_explain(request):
9595
# EXPLAIN QUERY PLAN dumps a more human-readable summary
9696
# See http://www.sqlite.org/lang_explain.html for details
9797
cursor.execute("EXPLAIN QUERY PLAN %s" % (sql,), params)
98+
elif engine == "psycopg2":
99+
cursor.execute("EXPLAIN ANALYZE %s" % (sql,), params)
98100
else:
99101
cursor.execute("EXPLAIN %s" % (sql,), params)
100102

0 commit comments

Comments
 (0)