Systems and methods for optimizing queries
AssigneeFacebook, Inc.
InventorsKevin Alan Schaeffer, Wojciech Galuba
Life of this patent
Estimating the term…
Abstract
Systems, methods, and non-transitory computer-readable media can receive a query that includes at least one operation for aggregating data stored in one or more database tables. A determination is made that at least a portion of the data being aggregated by the operation has been pre-computed. The query is optimized so that the operation uses the pre-computed data when executed.
Claims19
A computer-implemented method comprising:
- receiving, by a computing system, a query that includes at least one operation for aggregating data stored in one or more database tables;
- determining, by the computing system, that at least a portion of the data being aggregated by the operation has been pre-aggregated,
- wherein the data was pre-aggregated in response to a number of previous queries that aggregated the data, the number of previous queries that aggregated the data satisfying a threshold number;
- and
- optimizing, by the computing system, the query so that the operation uses the pre-aggregated data when executed.
A system comprising:
- at least one processor;
- and
- a memory storing instructions that, when executed by the at least one processor, cause the system to perform:
- receiving a query that includes at least one operation for aggregating data stored in one or more database tables;
- determining that at least a portion of the data being aggregated by the operation has been pre-aggregated, wherein the data was pre-aggregated in response to a number of previous queries that aggregated the data, the number of previous queries that aggregated the data satisfying a threshold number;
- and
- optimizing the query so that the operation uses the pre-aggregated data when executed.
A non-transitory computer-readable storage medium including instructions that, when executed by at least one processor of a computing system, cause the computing system to perform a method comprising:
- receiving a query that includes at least one operation for aggregating data stored in one or more database tables;
- determining that at least a portion of the data being aggregated by the operation has been pre-aggregated, wherein the data was pre-aggregated in response to a number of previous queries that aggregated the data, the number of previous queries that aggregated the data satisfying a threshold number;
- and
- optimizing the query so that the operation uses the pre-aggregated data when executed.
Dependencies are inferred from the claim text.