philbooth · GitHub

@philbooth

@philbooth

rfk

@philbooth

@philbooth philbooth changed the title feat(scripts): add scripts to automate EXPLAIN checks feat(scripts): add script to automate EXPLAIN checks

Sep 14, 2018

@philbooth

rfk

rfk approved these changes Sep 17, 2018

Adds a script that pulls out SELECT queries from our stored procedures
and then runs EXPLAINs for them in MySQL. Warnings are emitted for any
bad smells that are found in the EXPLAIN results, e.g. `filesort`.
Some of our old migrations don't conform to assumptions made by the
explain script. This change just tweaks some of the argument names so
that they stop showing up as errors in that script. There are no logical
changes to the stored procedures.
Some of our existing stored procedures fail in the explain script but we
don't want those failures to show up. In the future we may have reasons
for wanting to ignore other procedures too. This change lets us ignore
them while still running the script in CI.

@philbooth

@philbooth

@philbooth

Read the original on github.com ↗