Skip to content

Run EXPLAIN Against Queries #41

@NyanKiyoshi

Description

@NyanKiyoshi

Is your feature request related to a problem? Please describe.
We would like to be able to quickly analyze and detect issues against queries. Whether a missing index, optimize query, etc.

Describe the solution you'd like
A possibility would be to intercept QuerySets or SQL queries using django's connection wrapper feature. We would run EXPLAIN and save/append into a file or snapshot.

Possible issue to investigate: MySQL seems to trigger an infinite recursion when doing this–make sure it works on all RDBMS through travis-ci.

We also need to make sure we are not adding overhead or running queries multiple times–especially writes and we also allow return of values, e.g.:

UPDATE foo SET bar = 1 RETURNING id;

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions