US 11,704,347 B2
Adaptive interpretation and compilation of database queries
Thomas Neumann, Munich (DE); Viktor Leis, Munich (DE); Alfons Kemper, Munich (DE); Tobias Muehlbauer, Munich (DE); and Jan Finis, Munich (DE)
Assigned to Tableau Software, Inc., Seattle, WA (US)
Filed by Tableau Software, Inc., Seattle, WA (US)
Filed on Jul. 6, 2021, as Appl. No. 17/368,767.
Application 17/368,767 is a continuation of application No. 15/700,023, filed on Sep. 8, 2017, granted, now 11,055,331.
Claims priority of provisional application 62/532,959, filed on Jul. 14, 2017.
Claims priority of provisional application 62/418,246, filed on Nov. 6, 2016.
Prior Publication US 2021/0334298 A1, Oct. 28, 2021
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 16/00 (2019.01); G06F 16/33 (2019.01); G06F 16/23 (2019.01)
CPC G06F 16/3332 (2019.01) [G06F 16/23 (2019.01); G06F 16/334 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method for retrieving data from a database, comprising:
at a computer system having one or more processors and memory storing one or more programs configured for execution by the one or more processors:
receiving a database query;
determining an estimated query execution time for executing the database query and an estimated compilation time for at least partially compiling the database query;
in accordance with a determination that the estimated query execution time and the estimated compilation time satisfy an interpretation criterion, invoking a byte code interpreter to retrieve a result set from the database;
in accordance with a determination that the estimated query execution time and the estimated compilation time satisfy a compilation criterion, compiling an intermediate representation of the database query, and executing a compiled representation to retrieve the result set from the database; and
in accordance with a determination that the estimated query execution time and the estimated compilation time satisfy an optimized compilation criterion, optimizing and compiling the intermediate representation of the database query, and executing an optimized and compiled representation to retrieve the result set from the database.