Page MenuHomePhabricator

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

Authored by epriestley on Sep 7 2017, 8:40 PM.
Tags
None
Referenced Files
F13998833: D18573.diff
Thu, Oct 24, 11:26 AM
F13998115: D18573.diff
Thu, Oct 24, 7:39 AM
F13980700: D18573.id44604.diff
Sat, Oct 19, 12:09 PM
F13975101: D18573.id.diff
Fri, Oct 18, 8:45 AM
F13966839: D18573.id44600.diff
Wed, Oct 16, 9:58 AM
Unknown Object (File)
Wed, Oct 2, 1:29 PM
Unknown Object (File)
Sep 22 2024, 6:25 PM
Unknown Object (File)
Sep 18 2024, 2:05 PM
Subscribers
None

Details

Summary

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

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable