CPC G06F 16/2455 (2019.01) [G06F 16/2453 (2019.01); G06F 16/283 (2019.01); G06F 16/285 (2019.01)] | 20 Claims |
1. A system, comprising:
a first one or more computing devices, comprising at least one processor and memory, that implement a first query engine configured to:
receive a first query to a database at a first query engine;
determine a size of the first database query using a size classifier, wherein the size classifier is a machine learning model trained according to a machine learning technique using query plans to make size predictions for database queries, wherein the machine learning model takes as input a first query plan generated by the first query engine and produces as output a probability that the first database query is the size, wherein the size is determined according to an evaluation of the probability output from the machine learning model;
determine that the size of the first query is less than a size threshold to perform queries to the database at the first query engine using the size classifier that takes as input a second query plan generated by the first query engine;
perform the first query to the database at the first query engine based at least in part on the determination that the size of the first query is less than the size threshold to perform queries to the database at the first query engine;
receive a second query to the database at the first query engine;
determine, at the first query engine that performed the first query to the database, a size of the second database query;
determine, at the first query engine that performed the first query to the database, that the size of the second query is greater than or equal to the size threshold to perform queries to the database at the first query engine; and
after the determination at the first query engine that performed the first query that the size of the second query is greater than or equal to the size threshold to perform queries to the database at the first query engine, send, by the first query engine that performed the first query to the database, the second query along with the second query plan to a second query engine provisioned for additional capacity to handle increases in workload directed to the database; and
a second one or more computing devices, comprising a second processor and a second memory, that implement the second query engine, configured to:
receive, by the second query engine, the second query from the first query engine; and
perform the second query to the database at a second query engine.
|