aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar
diff options
context:
space:
mode:
authorDavid Cramer2013-02-25 02:19:31 -0800
committerDavid Cramer2013-02-25 02:19:31 -0800
commit42d7dde77e1c2daffaa5fa5bd16184f52c413c20 (patch)
tree73372cbac9def198e5b34bf439de724ab9865f98 /debug_toolbar
parent47b95b4dba3c91b6f1020ae70d973786a0d395a9 (diff)
parent1c30bc016f7c6a40aadb61f570c48bc0af49d153 (diff)
downloaddjango-debug-toolbar-42d7dde77e1c2daffaa5fa5bd16184f52c413c20.tar.bz2
Merge pull request #323 from mattrobenolt/explain-analyze
Add EXPLAIN ANALYZE for Postgres
Diffstat (limited to 'debug_toolbar')
-rw-r--r--debug_toolbar/views.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/debug_toolbar/views.py b/debug_toolbar/views.py
index 18b9460..4b4ebc9 100644
--- a/debug_toolbar/views.py
+++ b/debug_toolbar/views.py
@@ -95,6 +95,8 @@ def sql_explain(request):
# EXPLAIN QUERY PLAN dumps a more human-readable summary
# See http://www.sqlite.org/lang_explain.html for details
cursor.execute("EXPLAIN QUERY PLAN %s" % (sql,), params)
+ elif engine == "psycopg2":
+ cursor.execute("EXPLAIN ANALYZE %s" % (sql,), params)
else:
cursor.execute("EXPLAIN %s" % (sql,), params)