EddytorDocs & API
07 · Tables A→ZK · Maintain & tune performance

A maintenance cadence that scales

How often to optimize and vacuum so tables stay fast without wasting effort.

Maintenance is two periodic chores - optimize then vacuum - run often enough to keep reads fast, not so often that you waste effort or shrink your recovery window.

The standard loop

  1. profile_table - current row count / shape.
  2. optimize_table - compact small files.
  3. vacuum_table(dry_run=true) - preview deletions.
  4. Review file count + space savings.
  5. vacuum_table(dry_run=false) - execute.
  6. get_table_history - confirm both ran.

Order matters: optimize first, then vacuum.

How often

Table activityOptimizeVacuum
Frequent small writesafter each burst of writesperiodically (weekly), retention ≥ 168h
Steady/batch loadsafter the batchweekly/monthly
Rarely writtenonly if reads slowrarely
Tiny (< ~1000 rows)skip - negligible benefitrarely

Good to know

Check get_table_history for the last OPTIMIZE to avoid redundant runs. Don't optimize after every write - batch writes, then optimize.

Keep the recovery window in mind

Vacuum's retention_hours is your time-travel depth. Don't drop it below 168h (7 days) just to reclaim a little space - see Vacuum cuts time-travel.

Next

On this page