Patent ID: 11940966
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 6:
7. The method according to claim 6, wherein the SQL statement comprises a subquery statement, and the converting the SQL statement into the third vector comprises:
determining complexity of the subquery statement using a relational expression of complexity and a condition factor, wherein the condition factor comprises a condition type in the subquery and a table type related to the subquery;
determining a vector of the subquery statement based on the complexity of the subquery statement;
inputting the vector of the subquery statement into a cost model to obtain a complexity coefficient of the subquery statement, wherein a training sample of the cost model comprises a vector of a historical SQL statement executed by the DBMS and a complexity coefficient of the historical SQL statement; and
determining the third vector of the SQL statement based on the complexity coefficient of the subquery statement and a nesting relationship between the subquery statement and an upper-layer query statement that comprises the subquery statement.