Page MenuHomePhabricator

Provide "bin/storage analyze" and make "bin/storage upgrade" run analysis automatically

Authored by epriestley on Sep 7 2017, 8:40 PM.
Referenced Files
F13436163: D18573.id44604.diff
Thu, Jul 11, 7:49 AM
F13435882: D18573.diff
Thu, Jul 11, 6:32 AM
Wed, Jul 10, 3:44 AM
F13371092: D18573.id44600.diff
Thu, Jun 27, 11:09 PM
F13355272: D18573.diff
Mon, Jun 24, 10:29 AM
F13342213: D18573.diff
Thu, Jun 20, 11:01 AM
F13335550: D18573.diff
Wed, Jun 19, 2:21 AM
F13328077: D18573.id44604.diff
Sun, Jun 16, 3:07 AM



Ref T12819. Normallly "ANALYZE TABLE" is like sprinkling magic pixie dust on the database and hoping it will make "good vibes" that cause it to go faster, but in at least some concrete cases with the ngrams tables there really was a key cardinality issue which ANALYZE TABLE corrected, fixing bogus query plans.

Add bin/storage analyze to analyze all tables, and make bin/storage upgrade run it after adjustment if --no-adjust is not specified, and make bin/storage adjust run it always.

This runs in a couple seconds and should never hurt anything, so it should be fine to sprinkle lots of pixie dust into the bin/storage workflow.

Test Plan

Ran bin/storage analyze. Ran bin/storage upgrade, saw analyze run. Totally felt great vibes and really aligned chakras on the database.

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable