FastCompose: Eliminating compilation cold starts in query execution with composition
2026
Compilation-based query execution produces optimized machine code per query but introduces a cold-start problem: when the compiled code is not cached, the query stalls during compilation, delaying data processing by up to orders of magnitude relative to the query's execution time. This overhead dominates short-running queries and creates latency variability for both interactive analytics and ETL pipelines. We introduce composition, a complementary technique in which query-time code generation emits only lightweight glue code to arrange pre-compiled operators into a query-specific execution plan, rather than re-emitting or compiling any operator logic, at a fraction of the cost of full compilation. Composition eliminates the cold-start stall while compilation catches up in the background and takes over for peak performance. We implement composition in Amazon Redshift through FastCompose, which enables both modes from a single code-base without relying on a separate fallback engine for cold runs. Compared to compilation-only cold starts (with caching and serverless compilation active), FastCompose achieves 7.0× speedup on TPC-DS 100 GB, 2.0× on TPC-DS 3 TB, 12.0× on TPC-H 100 GB, and 1.6× on TPC-H 3 TB. FastCompose is deployed across thousands of Redshift clusters. On production workloads, composition reduces cold-start dashboard load times by 3.5× and ETL duration by 1.9×, removing compilation as a bottleneck.
Research areas