IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v12y2024i19p3102-d1491953.html
   My bibliography  Save this article

Learned Query Optimization by Constraint-Based Query Plan Augmentation

Author

Listed:
  • 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)

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.

Suggested Citation

  • Chen Ye & Haoyang Duan & Hua Zhang & Yifan Wu & Guojun Dai, 2024. "Learned Query Optimization by Constraint-Based Query Plan Augmentation," Mathematics, MDPI, vol. 12(19), pages 1-22, October.
  • Handle: RePEc:gam:jmathe:v:12:y:2024:i:19:p:3102-:d:1491953
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/12/19/3102/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/12/19/3102/
    Download Restriction: no
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:12:y:2024:i:19:p:3102-:d:1491953. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.