US 11,875,386 B2
Estimating as-a-service query prices within optimizer explained plans
Frank Roderic Vandervort, Ramona, CA (US); Louis Martin Burger, Escondido, CA (US); and Douglas P. Brown, Rancho Santa Fe, CA (US)
Assigned to Teradata US, Inc., San Diego, CA (US)
Filed by Teradata US, Inc., San Diego, CA (US)
Filed on Dec. 16, 2020, as Appl. No. 17/124,210.
Claims priority of provisional application 63/043,703, filed on Jun. 24, 2020.
Prior Publication US 2021/0406967 A1, Dec. 30, 2021
Int. Cl. G06Q 30/0283 (2023.01); G06F 16/2455 (2019.01); G06F 16/28 (2019.01)
CPC G06Q 30/0283 (2013.01) [G06F 16/2455 (2019.01); G06F 16/284 (2019.01)] 16 Claims
OG exemplary drawing
 
1. A computer-implemented method, comprising:
executing a relational database management system (RDBMS) in a computer system, wherein the RDBMS manages a relational database comprised of one or more tables stored on one or more data storage devices connected to the computer system;
accepting a query in the RDBMS;
automatically inserting an EXPLAIN modifier into the query in the RDBMS;
in response to automatically inserting the EXPLAIN modifier into the query in the RDBMS, generating a query execution plan for the query in the RDBMS;
computing one or more cost estimates to perform the query based on the query execution plan in the RDBMS, wherein the EXPLAIN modifier causes an optimizer of the RDBMS to compute the one or more cost estimates from one or more resource usage categories taken from one or more cost models;
generating a summary of the query execution plan for the query in the RDBMS in response to the EXPLAIN modifier, wherein the summary includes the one or more cost estimates for the RDBMS to perform the query;
generating one or more estimates from a query price estimator for the query based on the one or more cost estimates in the RDBMS, wherein the one or more estimates from the query price estimator are merged into the summary of the query execution plan generated in response to the EXPLAIN modifier; and
presenting the summary of the query execution plan to a user for use in optimizing the query.