CPC G06F 16/24537 (2019.01) [G06F 16/24545 (2019.01); G06F 16/24568 (2019.01); G06F 16/254 (2019.01); G06F 16/284 (2019.01)] | 16 Claims |
1. A data processing method, comprising:
receiving a data processing request carrying a query statement;
converting the query statement into a corresponding relational algebra tree based on the data processing request by parsing the query statement into a corresponding abstract syntax tree;
and converting the abstract syntax tree into the corresponding relational algebra tree, wherein the relational algebra tree includes tree nodes and edges;
determining an operation type corresponding to the query statement based on the relational algebra tree by:
determining structural information of the query statement and logical information of the query statement based on the relational algebra tree;
in response to the structural information of the query statement not satisfying a first preset rule and the logical information of the query statement not satisfying a second preset rule, determining an execution plan of the query statement based on the relational algebra tree and calculating a physical execution cost of the query statement according to the execution plan; and
determining the operation type corresponding to the query statement being a first type in response to the physical execution cost being less than or equal to a preset cost threshold;
delivering the query statement to a first database in response to the operation type being the first type; and
completing the data processing request in the first database based on the query statement.
|