An Optimize DB run, step by step

An Optimize DB run, step by step A workflow diagram generated by Archify. 01 / Build the plan (changes nothing) 02 / Run the plan EX / Stop, time limit or worse Memory snapshot · every cube · Build the plan (changes nothing) Memory snapshot every cube Skip cubes · see card below · Build the plan (changes nothing) Skip cubes see card below New order · fewest leaves first · Build the plan (changes nothing) · review it New order fewest leaves first review it Pause chores · if you asked · Run the plan · optional Pause chores if you asked optional Next cube · smallest first · Run the plan Next cube smallest first Reorder · server reports memory · Run the plan Reorder server reports memory Summary · chores back on · Run the plan Summary chores back on Stopped · Resume later · Stop, time limit or worse Stopped Resume later Put back · memory grew · Stop, time limit or worse Put back memory grew Stop / no time queue done

Cubes it skips

  • • Excluded, empty, under 10 MB, or fewer than 3 dimensions
  • • String dimensions (any by default; more than one with pin_last), or already in order

The new order

  • • Leaf elements, fewest first; with pin_last the string dimension stays last
  • • Not benchmarked: follow with optimize where it matters

Stops and limits

  • • Stop and the time limit act between cubes
  • • Paused chores come back on every exit; Resume uses the time left