diff options
| author | Matt Robenolt | 2012-09-16 19:32:32 -0700 | 
|---|---|---|
| committer | Matt Robenolt | 2012-09-16 19:32:32 -0700 | 
| commit | 1c30bc016f7c6a40aadb61f570c48bc0af49d153 (patch) | |
| tree | f2fa67416d537b060d2c323336f5c490af1fe224 /debug_toolbar | |
| parent | ad152874296ec55e322696dcd6c539a33a423f51 (diff) | |
| download | django-debug-toolbar-1c30bc016f7c6a40aadb61f570c48bc0af49d153.tar.bz2 | |
Add EXPLAIN ANALYZE for Postgres
Diffstat (limited to 'debug_toolbar')
| -rw-r--r-- | debug_toolbar/views.py | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/debug_toolbar/views.py b/debug_toolbar/views.py index be917ff..759cb66 100644 --- a/debug_toolbar/views.py +++ b/debug_toolbar/views.py @@ -87,6 +87,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) | 
