Statistics management for database querying
First Claim
Patent Images
1. A method of obtaining data from a database, the database including a query optimizer to generate a query plan based on on-demand database statistics, the method comprising:
- obtaining model database statistics representative of an expected state of the database in the future, the model database statistics being generated based on a subset of expected utilization information for a tenant supported by the database, the expected utilization information representing the tenant'"'"'s likely usage of a table in the database at a time in the future, wherein generating the model database statistics comprises;
obtaining a subset of database statistics that are most likely to influence the query optimizer; and
generating the model database statistics that are likely to influence the query optimizer based on the subset of database statistics and the subset of the expected utilization information; and
modifying on-demand database statistics maintained by the database to reflect the model database statistics, wherein the query plan generated by the database to obtain the data based on the on-demand database statistics is influenced by the model database statistics.
2 Assignments
0 Petitions
Accused Products
Abstract
Methods and systems are provided for querying a database. One exemplary method for obtaining data from an on-demand database supporting one or more tenants involves obtaining model database statistics based on expected utilization information for a tenant and providing the model database statistics to the on-demand database. The on-demand database utilizes the model database statistics to generate a query plan and executes the query plan to obtain data from the model database statistics.
-
Citations
20 Claims
-
1. A method of obtaining data from a database, the database including a query optimizer to generate a query plan based on on-demand database statistics, the method comprising:
-
obtaining model database statistics representative of an expected state of the database in the future, the model database statistics being generated based on a subset of expected utilization information for a tenant supported by the database, the expected utilization information representing the tenant'"'"'s likely usage of a table in the database at a time in the future, wherein generating the model database statistics comprises; obtaining a subset of database statistics that are most likely to influence the query optimizer; and generating the model database statistics that are likely to influence the query optimizer based on the subset of database statistics and the subset of the expected utilization information; and modifying on-demand database statistics maintained by the database to reflect the model database statistics, wherein the query plan generated by the database to obtain the data based on the on-demand database statistics is influenced by the model database statistics. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A method of obtaining data from a database, the method comprising:
-
generating model database statistics having values representative of an anticipated state of the database in the future based on expected utilization information for a tenant supported by the database, wherein generating the model database statistics comprises; obtaining a subset of database statistics determined by a database management system based on the expected utilization information; and creating the model database statistics having the values representative of the anticipated state of the database based at least in part on the obtained subset of database statistics determined by the database management system; and providing the model database statistics to the database by modifying on-demand database statistics maintained by the database to reflect the model database statistics, wherein; a query optimizer of the database generates a query plan based on the on-demand database statistics; and the query plan generated by the database to obtain the data is influenced by the model database statistics.
-
-
18. A system comprising:
-
a database to maintain on-demand database statistics, the database including a query optimizer to generate a query plan based on the on-demand database statistics; and a server coupled to the database to obtain model database statistics for the database and provide the model database statistics to the database by modifying the on-demand database statistics maintained by the database to reflect the model database statistics, wherein; the model database statistics are representative of an expected state of the database in the future and are generated based on a subset of expected utilization information for a tenant supported by the database and a subset of database statistics that are most likely to influence the query optimizer; the expected utilization information represents the tenant'"'"'s likely usage of a table in the database at a time in the future; and the query plan to obtain data that is generated by the database based on the on-demand database statistics is influenced by the model database statistics. - View Dependent Claims (19, 20)
-
Specification