US 11,907,218 B1
Automatic prevention of plan regressions
Sunil P. Chakkappen, Foster City, CA (US); Mohamed Ziauddin, Pleasanton, CA (US); Cetin Ozbutun, Atherton, CA (US); Palash Sharma, Belmont, CA (US); Yiqiong Zhang, Newark, CA (US); and Zhan Li, Palo Alto, CA (US)
Assigned to Oracle International Corporation, Redwood Shores, CA (US)
Filed by Oracle International Corporation, Redwood Shores, CA (US)
Filed on Aug. 12, 2022, as Appl. No. 17/886,804.
Int. Cl. G06F 16/2453 (2019.01); G06F 16/958 (2019.01)
CPC G06F 16/24542 (2019.01) [G06F 16/972 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
in a first user database session, in response to receiving a first database statement:
generating a first execution plan,
while executing the first execution plan, recording first performance data that indicates one or more first performance metrics of executing the first execution plan for the first database statement;
wherein the one or more first performance metrics pertain to one or more of Central Processing Unit time, elapsed time, buffer gets, disk reads, or temporary space usage;
after recording the first performance data, receiving a second database statement, wherein the first execution plan can be used to generate a result for the second database statement;
in a second user database session, in response to receiving the second database statement:
generating a second execution plan,
while executing the second execution plan, recording second performance data that indicates one or more second performance metrics of executing the second execution plan for the second database statement;
performing a comparison between the first performance data and the second performance data;
based on the comparison, determining whether to store the second execution plan for future use when processing the second database statement or another database statement for which the second execution plan can be used;
wherein the method is performed by one or more computing devices.