Distribution styles

  • AUTO — Redshift chooses. Good default for new tables.
  • KEY — rows with the same key value go to the same slice. Use for large fact tables joined on a foreign key.
  • ALL — full copy on every slice. Use for small dimension tables (<5M rows) joined frequently.
  • EVEN — round-robin. Use when no join key is dominant.

Sort keys

Compound sort keys work best for queries filtering on the first sort column. Interleaved sort keys distribute weight equally — better for multi-column filter patterns but have higher maintenance cost.

VACUUM and ANALYZE

  • VACUUM SORT ONLY — re-sorts unsorted rows. Run after bulk loads.
  • VACUUM DELETE ONLY — reclaims space from deleted rows.
  • ANALYZE — updates query planner statistics. Run after significant data changes.

WLM — Workload Management

Define separate query queues for ETL, BI, and ad-hoc with concurrency and memory limits. Prevents a single runaway query from starving dashboard queries.