Cardinality estimation, the process of predicting the number of rows resulting from a database query, significantly impacts database performance, and researchers continually seek ways to improve its accuracy and speed. Tobias Winker, Jinghua Groppe, and Sven Groppe, all from the University of Lübeck, present a novel approach to this challenge, utilising quantum computing to enhance estimation techniques. Their work introduces QCardEst, a cardinality estimation method employing a hybrid classical-quantum network, and QCardCorr, a correction method that refines existing classical estimators with quantum-generated factors. The team demonstrates substantial improvements over standard database optimisation tools, achieving up to 8. 66times better performance, and even surpassing established methods like MSCN, highlighting the potential of quantum computing to revolutionise database management systems.
Quantum Machine Learning for Database Performance
This research explores the potential of combining quantum computing and machine learning to improve database performance, specifically in areas like cardinality estimation and query optimization. Accurate cardinality estimation, predicting the number of rows resulting from query operations, is fundamental to efficient query optimization; inaccurate estimates lead to poor performance. Traditional methods often struggle with real-world datasets due to simplifying assumptions, and optimizing complex queries, especially those involving many joins, is computationally challenging. Scientists are exploring several quantum approaches, including variational quantum circuits (VQCs) functioning as machine learning models that learn cardinality estimation functions directly from data.
Quantum annealing tackles optimization problems by formulating them as Quadratic Unconstrained Binary Optimization (QUBO) problems, suitable for quantum annealers, and Quantum Graph Neural Networks (QGNNs) are being investigated for learning representations of relational databases and improving query performance. A key theme is the integration of classical and quantum resources, often combining classical machine learning with quantum algorithms to leverage the strengths of both. Techniques like QUBO formulation convert query optimization problems into a format solvable by quantum annealers, and deep learning is employed to improve cardinality estimation by learning complex relationships. This growing body of work investigates whether quantum computing can revolutionize database systems by improving estimation accuracy, optimizing query plans, and delivering faster data processing.
Hybrid Quantum Network Estimates Query Cardinality
This study introduces QCardEst, a novel approach to cardinality estimation, a crucial component of query optimization, by developing a hybrid classical-quantum network. Researchers engineered a compact encoding scheme to translate SQL queries into a quantum state, requiring only a number of qubits equivalent to the number of tables within the query. This allows for processing an entire query using a single variational quantum circuit (VQC) on current quantum hardware, streamlining the estimation process. To refine the cardinality predictions, the team developed Cardinality Correction (QCardCorr), multiplying the output of classical cardinality estimators with a factor generated by a separate VQC, thereby improving accuracy.
Using the JOB-light and STATS datasets, the team demonstrated a significant 6. 37-times improvement over the standard PostgreSQL optimizer and an 8. 66-times improvement for STATS. Notably, QCardCorr outperformed the MSCN method by a factor of 3. 47 on the JOB-light dataset, highlighting the effectiveness of the quantum-enhanced correction.
The methodology centers on harnessing VQCs to learn complex relationships within query data and refine cardinality estimates. Researchers trained these circuits to predict correction factors, effectively bridging the gap between classical estimation techniques and the potential of quantum computation. This innovative combination of classical and quantum resources offers a promising pathway toward more efficient and scalable database query optimization.
Quantum Cardinality Estimation Improves Database Performance
The research team developed a novel approach to cardinality estimation, a critical component of database query optimization, by leveraging a hybrid classical-quantum network. Scientists achieved a compact encoding method, representing SQL queries with a number of qubits equal to the number of tables involved, enabling processing with a single variational quantum circuit on current hardware. Experiments revealed that this method, termed QCardCorr, improves upon the standard PostgreSQL optimizer by a factor of 6. 37 for the JOB-light dataset and 8. 66 for the STATS dataset.
Further analysis demonstrates that QCardCorr outperforms the MSCN method by a factor of 3. 47 on the JOB-light dataset, highlighting a significant advancement in estimation accuracy. The team introduced Cardinality Correction, which refines existing classical cardinality estimators by multiplying their output with a factor generated by a quantum circuit, thereby enhancing the overall estimation process. The study details a compact query encoding, successfully representing queries joining n tables with n qubits, making the approach feasible for implementation on existing quantum hardware. The results demonstrate that QCardCorr not only improves upon existing classical methods but also offers a pathway for integrating quantum computing into database management systems, potentially leading to substantial gains in query optimization and database performance.
Quantum Cardinality Estimation with Hybrid Algorithms
The research presents a novel approach to cardinality estimation, a crucial component of database management systems, by leveraging hybrid quantum-classical algorithms. The team developed a method to encode SQL queries into a compact quantum representation, requiring only a number of qubits equivalent to the number of tables involved. This allows for processing complete queries using a single variational quantum circuit on current hardware. Furthermore, the researchers introduced a cardinality correction technique, improving the accuracy of existing classical cardinality estimators by applying a factor generated through a quantum circuit.
Results demonstrate that this quantum-enhanced approach outperforms the standard cardinality estimation within PostgreSQL, achieving improvements of up to 8. 66times for certain datasets. The team also showed that their method surpasses the performance of other established techniques, such as MSCN, in specific scenarios. Future work could explore the potential of this hybrid approach with different quantum circuit designs and across a wider range of database workloads. The code developed for this research is publicly available, enabling further investigation and replication of the results.
👉 More information
🗞 QCardEst/QCardCorr: Quantum Cardinality Estimation and Correction
🧠 ArXiv: https://arxiv.org/abs/2509.08817
