Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run EXPLAIN Against Queries #41

Open
NyanKiyoshi opened this issue May 7, 2020 · 0 comments
Open

Run EXPLAIN Against Queries #41

NyanKiyoshi opened this issue May 7, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@NyanKiyoshi
Copy link
Owner

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;
@NyanKiyoshi NyanKiyoshi added the enhancement New feature or request label May 7, 2020
@NyanKiyoshi NyanKiyoshi added this to the v2.0.0 milestone May 7, 2020
@NyanKiyoshi NyanKiyoshi self-assigned this May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant