Query cost estimation method and device, medium and equipment
By using a network prediction model that integrates query plan trees and index features, the accuracy of query cost estimation is improved, query efficiency prediction accuracy is enhanced, and index optimization is supported.
CN122240660APending Publication Date: 2026-06-19BEIJING OCEANBASE TECHNOLOGY CO LTD
3 Cites 0 Cited by
Patent Information
- Application Number
- CN202610187083.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-09
- Publication Date
- 2026-06-19
AI Technical Summary
Technical Problem
Existing technologies struggle to accurately estimate the query cost of a query statement under indexed conditions, thus impacting query efficiency.
Method used
By acquiring features of the query plan tree and created indexes, a pre-trained query cost estimation model is used for prediction, which includes a combination of query plan encoder, index encoder, fusion network and prediction network, fusing node features and index features to predict query costs.
Benefits of technology
It enables accurate query cost estimation under the condition that an index has been created, improves the prediction accuracy of query efficiency, and supports the optimization and adjustment of indexes.
✦ Generated by Eureka AI based on patent content.
Abstract
The embodiment of the invention discloses a query cost estimation method, which comprises the following steps of: acquiring a query statement to be executed, determining each created index, encoding each execution node in a query plan tree corresponding to the query statement to be executed through a query plan encoder to obtain a node feature corresponding to each execution node, and encoding the created indexes through an index encoder to obtain index features, fusing the node features and the index features through a fusion network to obtain query plan execution features, and finally predicting the query cost through a prediction network according to the query plan features. By means of the method, after the node features of each execution node in the query plan tree and the index features of the created indexes are coded, the query plan execution features used for representing execution of the query plan tree under the condition of each created index are obtained through fusion, and finally the query cost is predicted through the prediction network. And the query cost can be accurately estimated.
Need to check novelty before this filing date? Find Prior Art