NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Parametric Query Optimization

Yannis E. Ioannidis, Raymond T. Ng, Kyuseok Shim, Timos K. Sellis

This paper addresses a fundamental challenge in database management: the "plan-at-compile-time" problem. Traditional query optimizers are "point-based," meaning they assume fixed values for system parameters—such as available buffer space or data distributions—at the moment a query is compiled. However, in dynamic multi-user environments, actual runtime conditions often deviate significantly from these assumptions, leading to severe performance degradation.

The Problem: Static Plans in Dynamic Environments

When a runtime environment differs from compile-time assumptions, the chosen execution plan can be disastrously slow. For instance, a plan optimized for 150 buffer pages might be over three times more expensive than the optimal choice if only 20 pages are actually available at runtime. Optimizing for every possible buffer size individually is computationally prohibitive, creating a need for a more efficient approach to find optimal plans across a range of parameter values.

Figure 1: Relative costs of plans optimized for different buffer sizes. A plan optimized for one size (e.g., s0(150)) can perform poorly when executed with fewer buffers.

Methodology: Sideways Information Passing (SIP)

The authors propose a framework for Parametric Query Optimization that generates a complete "plan function" in roughly the same time it usually takes to find a single plan. They enhance standard randomized optimization algorithms, such as Iterative Improvement (II) and Two-Phase Optimization (2PO), with a novel technique called Sideways Information Passing (SIP).

Instead of running isolated optimizations for each parameter value (e.g., each buffer size), the SIP approach runs them concurrently as co-routines. These co-routines communicate by sharing promising plans. If a plan found for one buffer size is superior for a neighboring size, the neighbor adopts it immediately, bypassing redundant search efforts. This communication effectively transforms the search space into a "perfect well," where local searches quickly converge to global minima.

Figure 3: Illustration of sideways information passing. A plan (S4) discovered for buffer size 14 is evaluated by co-routines for neighboring buffer sizes.

Key Results and Insights

The researchers evaluated their approach using a synthetic testbed of tree queries ranging from 1 to 20 joins. Their findings highlight several advantages of the SIP-enhanced randomized algorithms:

  • Efficiency: The sipIIs algorithm can optimize a query for an entire range of buffer sizes (e.g., 2 to 70) in the same amount of time a standard optimizer takes for a single point.
  • Quality: For complex 20-join queries, the generated plan functions were typically within 4-8% of the optimal cost across the entire parameter range. For smaller queries, results were often within 1% of optimal.
  • Robustness: The system identifies "image partitions"—ranges where a single plan remains optimal—allowing the database to use a simple lookup table at runtime to select the best execution strategy.

Conclusion

Parametric Query Optimization via Sideways Information Passing offers a robust solution to the volatility of runtime environments. While the study focused primarily on buffer size, the framework provides a foundation for handling larger vectors of diverse parameters, such as CPU load and varying selectivity. Future work remains to address plan proliferation and the scaling of these techniques to multi-dimensional parameter spaces.

Summary updated

BibTeX
@inproceedings{ioannidis1992parametric,
  author = {Yannis E. Ioannidis and Raymond T. Ng and Kyuseok Shim and Timos K. Sellis},
  title = {{Parametric Query Optimization}},
  booktitle = {VLDB},
  year = {1992},
}
Figure