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

Compact small files

Merge small Parquet files into larger ones with optimize_table for faster reads.

optimize_table compacts a table's many small Parquet files into fewer larger ones - the single biggest read-performance win after a run of small writes. It creates a new version but does not change your data.

Optimize

eddytor optimize table eddytor sales orders
{ "table": "eddytor.cfg_xxx.<uuid>_products", "target_size_mb": 256 }

When to run it

  • After sequences of many small writes (dozens of inserts/merges) - that's where it pays off most.
  • Not after every write - batch first, then optimize periodically.
  • Skip tiny tables (< ~1000 rows) - minimal benefit.

Good to know

optimize_table is idempotent - running it again on an already-optimized table is harmless. It shows up in history as an OPTIMIZE version; don't mistake it for a data change when picking a rollback point.

Then reclaim space

Optimize creates compacted files but leaves the old small ones until you vacuum. Order matters: optimize first, then vacuum.

Next

On this page