EconPapers    
Economics at your fingertips  
 

Learned Query Optimization by Constraint-Based Query Plan Augmentation

Chen Ye, Haoyang Duan, Hua Zhang (), Yifan Wu and Guojun Dai
Additional contact information
Chen Ye: College of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou 310018, China
Haoyang Duan: College of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou 310018, China
Hua Zhang: College of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou 310018, China
Yifan Wu: College of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou 310018, China
Guojun Dai: College of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou 310018, China

Mathematics, 2024, vol. 12, issue 19, 1-22

Abstract: Over the last decades, various cost-based optimizers have been proposed to generate optimal plans for SQL queries. These optimizers are key to achieving good performance in database systems and can speed up query execution. Still, they may need enormous expert efforts and perform poorly on complicated queries. Learning-based optimizers have been shown to achieve high-quality plans by learning from past experiences. However, these solutions treat each query separately and neglect the semantic equivalence among different queries. Intuitively, a high-quality plan may be obtained for a complicated query by discovering a simple equivalent query. Motivated by this, in this paper, we present Celo, a novel constraint-enhanced learned optimizer to directly integrate the equivalent information of queries into the learning-based model. We apply denial constraints to identify equivalent queries by replacing equivalent predicates. Given a query, we augment the query plans generated by the learning-based model with the high-quality plans of its equivalent queries. Then, a more potentially well-performed plan will be predicted among the augmented query plans. Extensive experiments using real-world datasets demonstrated that Celo outperforms the previous state-of-the-art (SOTA) results even with few constraints.

Keywords: query optimization; query plan augmentation; tree convolutional neural network; denial constraints (search for similar items in EconPapers)
JEL-codes: C (search for similar items in EconPapers)
Date: 2024
References: View complete reference list from CitEc
Citations:

Downloads: (external link)
https://www.mdpi.com/2227-7390/12/19/3102/pdf (application/pdf)
https://www.mdpi.com/2227-7390/12/19/3102/ (text/html)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:gam:jmathe:v:12:y:2024:i:19:p:3102-:d:1491953

Access Statistics for this article

Mathematics is currently edited by Ms. Emma He

More articles in Mathematics from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().

 
Page updated 2025-03-19
Handle: RePEc:gam:jmathe:v:12:y:2024:i:19:p:3102-:d:1491953