US 11,940,997 B2
Query processing using logical query steps having canonical forms
Ahmad Ghazal, Redondo Beach, CA (US); Ron-Chung Hu, Palo Alto, CA (US); and Mingyi Zhang, Santa Clara, CA (US)
Assigned to Futurewei Technologies, Inc., Addison, TX (US)
Filed by Futurewei Technologies, Inc., Plano, TX (US)
Filed on Sep. 1, 2021, as Appl. No. 17/446,679.
Application 17/446,679 is a continuation of application No. PCT/CN2020/080149, filed on Mar. 19, 2020.
Claims priority of provisional application 62/822,463, filed on Mar. 22, 2019.
Prior Publication US 2022/0004551 A1, Jan. 6, 2022
Int. Cl. G06F 16/24 (2019.01); G06F 16/22 (2019.01); G06F 16/242 (2019.01); G06F 16/2455 (2019.01)
CPC G06F 16/2433 (2019.01) [G06F 16/2255 (2019.01); G06F 16/2455 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A query processing device comprising:
a communication interface for accessing a database and a database catalog;
a memory storing instructions; and
at least one processor in communication with the memory and the communication interface, the at least one processor configured, upon execution of the instructions, to perform the following steps:
parsing a query to generate first and second execution plans for the query, each execution plan of the first and second execution plans including one or more logical steps in a predefined canonical form;
retrieving, using a hash table in the database catalog, previously determined cardinality values for previously executed logical steps of the first and second execution plans, the hash table storing an entry for each logical step of the previously executed logical steps, and the entry relating a hash value of the predefined canonical form of the logical step to its cardinality value;
selecting an execution plan from the first execution plan or the second execution plan, the selected execution plan having a lower cost based on the previously determined cardinality values; and
executing the selected execution plan using data accessed from the database via the communication interface.