django-debug-toolbar/django-debug-toolbar — Issue #227: Query explain doesn't work on Oracle
Author: shaib
Created: 2011-10-31 10:21:19+00:00
State: open

Hi,

I found this on version 0.8.3 (latest release, AFAIK).

Code in debug_toolbar/views.py, lines 81-87 (88-94 on master/trunk as I write this) executes an "explain" command with `explain query plan %s` for sqlite and `explain %s` for anything else.

For Oracle something a little more involved is required. First, the command syntax is `explain plan for %s`; second, the command does not in fact give the explanation as output but stores it in a table from which one needs to extract it. See http://www.orafaq.com/wiki/Explain_Plan

Thanks,
Shai.