Query optimization method and apparatus
AssigneeAlipay (Hangzhou) Information Technology Co., Ltd.
InventorJian NIU
Life of this patent
Estimating the term…
Abstract
A query optimization method includes: obtaining a plurality of query tasks to be optimized, each query task including at least one subtask, and when a same query task includes at least two subtasks, a query dependence relationship existing between the at least two subtasks; combining the plurality of query tasks based on the query dependence relationship to obtain a combined task; and merging at least two subtasks in different query tasks of the plurality of query tasks based on the combined task to obtain a first merged subtask, the first merged subtask being executed to obtain query results of the at least two subtasks in the different query tasks.
Claims17
A query optimization method, comprising:
- obtaining a plurality of query tasks to be optimized, each query task including at least one subtask, and when a same query task includes at least two subtasks, a query dependence relationship existing between the at least two subtasks;
- combining the plurality of query tasks based on the query dependence relationship to obtain a combined task;
- and
- merging at least two subtasks in different query tasks of the plurality of query tasks based on the combined task to obtain a first merged subtask, the first merged subtask being executed to obtain query results of the at least two subtasks in the different query tasks.
A query optimization apparatus, comprising:
- a processor;
- and
- a memory storing instructions executable by the processor,
- wherein the processor is configured to:
- obtain a plurality of query tasks to be optimized, each query task including at least one subtask, and when a same query task includes at least two subtasks, a query dependence relationship existing between the at least two subtasks;
- combine the plurality of query tasks based on the query dependence relationship to obtain a combined task;
- and
- merge at least two subtasks in different query tasks of the plurality of query tasks based on the combined task to obtain a first merged subtask, the first merged subtask being executed to obtain query results of the at least two subtasks in the different query tasks.
A non-transitory computer readable storage medium having stored therein instructions that, when executed by a processor of a device, cause the device to perform a query optimization method, the method comprising:
- obtaining a plurality of query tasks to be optimized, each query task including at least one subtask, and when a same query task includes at least two subtasks, a query dependence relationship existing between the at least two subtasks;
- combining the plurality of query tasks based on the query dependence relationship to obtain a combined task;
- and
- merging at least two subtasks in different query tasks of the plurality of query tasks based on the combined task to obtain a first merged subtask, the first merged subtask being executed to obtain query results of the at least two subtasks in the different query tasks.
Dependencies are inferred from the claim text.