Skip to content

Commit 1c30bc0

Browse files
committed
Add EXPLAIN ANALYZE for Postgres
1 parent ad15287 commit 1c30bc0

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
@@ -87,6 +87,8 @@ def sql_explain(request):
8787
# EXPLAIN QUERY PLAN dumps a more human-readable summary
8888
# See http://www.sqlite.org/lang_explain.html for details
8989
cursor.execute("EXPLAIN QUERY PLAN %s" % (sql,), params)
90+
elif engine == "psycopg2":
91+
cursor.execute("EXPLAIN ANALYZE %s" % (sql,), params)
9092
else:
9193
cursor.execute("EXPLAIN %s" % (sql,), params)
9294

0 commit comments

Comments
 (0)