US 12,147,440 B2
Techniques for maintaining statistics in a database system
Mohamed Zait, San Jose, CA (US); Yuying Zhang, Foster City, CA (US); Hong Su, San Carlos, CA (US); and Jiakun Li, San Mateo, CA (US)
Assigned to Oracle International Corporation, Redwood Shores, CA (US)
Filed by Oracle International Corporation, Redwood Shores, CA (US)
Filed on Sep. 23, 2021, as Appl. No. 17/483,326.
Application 17/483,326 is a division of application No. 16/533,614, filed on Aug. 6, 2019, granted, now 11,468,073.
Prior Publication US 2022/0012240 A1, Jan. 13, 2022
Int. Cl. G06F 16/24 (2019.01); G06F 16/22 (2019.01); G06F 16/2458 (2019.01); G06N 7/01 (2023.01); G06N 20/00 (2019.01)
CPC G06F 16/2462 (2019.01) [G06F 16/221 (2019.01); G06N 7/01 (2023.01); G06N 20/00 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
obtaining current values for one or more predictor statistics for a particular statistic, wherein:
the particular statistic is a column-level statistic that relates to values currently in a particular column of a particular database table, and
each predictor statistic of the one or more predictor statistics is one of:
a table-level statistic that relates to the particular database table,
a column-level statistic, different from the particular statistic, that relates to values currently in a given column of a given database table, or
an index-level statistic that relates to an index associated with the particular database table;
generating, by a database server, a predicted value for the particular statistic, using a prediction mechanism, based on:
the current values obtained for the one or more predictor statistics,
historical values of the one or more predictor statistics, and
historical values of the particular statistic;
receiving, over a network from a requestor, a query that references the particular column of the particular database table;
selecting, by the database server in response to the query, a particular query plan for the query, from among a plurality of candidate query plans, based at least in part on the predicted value for the particular statistic;
executing, by the database server, the query according to the particular query plan to generate a set of query results; and
providing the set of query results to the requester over the network,
wherein the method is performed by one or more computing devices.