US 11,954,105 B2
Method and system for storing query plans in a cache and method for querying a database system
Fang Zheng, Sunnyvale, CA (US); Zhe Chen, Hangzhou (CN); Ruiping Li, Sunnyvale, CA (US); Congnan Luo, Sunnyvale, CA (US); Yu Dong, Sunnyvale, CA (US); Jie Zhang, Sunnyvale, CA (US); Li Zhang, Sunnyvale, CA (US); Ji Jiannan, Hangzhou (CN); Dongcan Cui, Hangzhou (CN); and Chaoqun Zhan, Hangzhou (CN)
Assigned to Alibaba Group Holding Limited, Grand Cayman (KY)
Appl. No. 17/420,567
Filed by ALIBABA GROUP HOLDING LIMITED, Grand Cayman (KY)
PCT Filed Jan. 30, 2019, PCT No. PCT/CN2019/073885
§ 371(c)(1), (2) Date Jul. 2, 2021,
PCT Pub. No. WO2020/154945, PCT Pub. Date Aug. 6, 2020.
Prior Publication US 2022/0114179 A1, Apr. 14, 2022
Int. Cl. G06F 16/2455 (2019.01); G06F 16/2453 (2019.01)
CPC G06F 16/24552 (2019.01) [G06F 16/24539 (2019.01); G06F 16/24542 (2019.01)] 15 Claims
OG exemplary drawing
 
1. A method for storing a query plan in a cache, comprising:
determining a use frequency of the query plan, the query plan including at least one query operator;
determining a target storage layer for storing the query plan based on the determined use frequency, wherein the cache includes at least two storage layers and each of the storage layers is associated with a compression level of query plans;
processing the query plan according to the compression level of the target storage layer, wherein processing the query plan comprises:
determining a compression level difference between the compression levels of a first storage layer and the target storage layer,
determining a compression change to the at least one query operator of the query plan based on the compression level difference, and
performing the compression change to the at least one query operator of query plan according to a compression algorithm; and
storing the processed query plan in the target storage layer, wherein the query plan is previously stored in the first storage layer different from the target storage layer and is moved from the first storage layer to the target storage layer.