Creating a custom index in a multi-tenant database environment
First Claim
Patent Images
1. A method comprising:
- monitoring queries that are applied to and running on a database;
flagging at least some of the monitored queries that run more slowly than others of the monitored queries as each being recommended as a candidate query for creating an additional filter to enhance the performance of the respective query;
evaluating the candidate queries against criteria in a background process, wherein a first of the criteria is a score for selectivity, the score being a ratio of a number of rows available to the query within the database to a number of rows queried from among the available rows multiplied by a scaling factor based on the elapsed time for the query;
ranking the candidate queries based on the evaluating;
selecting a candidate query based on the ranking from the evaluating;
utilizing a message queue structure to enqueue custom index creation to be performed at a later time; and
creating the additional filter for the selected candidate query using copies of data from the database as an index table for use by the selected query when running on the database, wherein the additional filter is to limit the selected query to a subset of rows of the database contained within the index table.
5 Assignments
0 Petitions
Accused Products
Abstract
Methods and systems are described for creating a custom index in a multi-tenant database environment. In one embodiment, a method includes obtaining query for a multi-tenant database that is recommended as a candidate for creating an additional filter, evaluating the query against criteria to determine whether to select the query for creating the additional filter, and creating the additional filter for the query, if the query is selected.
-
Citations
19 Claims
-
1. A method comprising:
-
monitoring queries that are applied to and running on a database; flagging at least some of the monitored queries that run more slowly than others of the monitored queries as each being recommended as a candidate query for creating an additional filter to enhance the performance of the respective query; evaluating the candidate queries against criteria in a background process, wherein a first of the criteria is a score for selectivity, the score being a ratio of a number of rows available to the query within the database to a number of rows queried from among the available rows multiplied by a scaling factor based on the elapsed time for the query; ranking the candidate queries based on the evaluating; selecting a candidate query based on the ranking from the evaluating; utilizing a message queue structure to enqueue custom index creation to be performed at a later time; and creating the additional filter for the selected candidate query using copies of data from the database as an index table for use by the selected query when running on the database, wherein the additional filter is to limit the selected query to a subset of rows of the database contained within the index table. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A non-transitory machine-readable medium carrying one or more sequences of instructions for creating custom indexes in a database, the database being a multi-tenant database system, which instructions, when executed by one or more processors, cause the one or more processors to carry out the steps of:
-
monitoring queries that are applied to and running on a database; flagging at least some of the monitored queries that run more slowly than others of the monitored queries as each being recommended as a candidate query for creating an additional filter to enhance the performance of the respective query; evaluating the candidate queries against criteria in a background process, wherein a first of the criteria is a score for selectivity, the score being a ratio of a number of rows available to the query within the database to a number of rows queried from among the available rows multiplied by a scaling factor based on the elapsed time for the query; ranking the candidate queries based on the evaluating; selecting a candidate query based on the ranking from the evaluating; utilizing a message queue structure to enqueue custom index creation to be performed at a later time; and creating the additional filter for the selected candidate query using copies of data from the database as an index table for use by the selected query when running on the database, wherein the additional filter is to limit the selected query to a subset of rows of the database contained within the index table. - View Dependent Claims (11, 12, 13)
-
-
14. An apparatus for creating custom indexes in a database, the database being a multi-tenant database, the apparatus comprising:
-
a hardware processor; and one or more stored sequences of instructions which, when executed by the processor, cause the processor to carry out the steps of; monitoring queries that are applied to and running on a database; flagging at least some of the monitored queries that run more slowly than others of the monitored queries as each being recommended as a candidate query for creating an additional filter to enhance the performance of the respective query; evaluating the candidate queries against criteria in a background process, wherein a first of the criteria is a score for selectivity, the score being a ratio of a number of rows to the query within the database to a number of rows queried from among the available rows multiplied by a scaling factor based on factored by the elapsed time for the query; ranking the candidate queries based on the evaluating; selecting a candidate query based on the ranking from the evaluating; utilizing a message queue structure to enqueue custom index creation to be performed at a later time; and creating the additional filter for the selected candidate query using copies of data from the database as an index table for use by the selected query when running on the database, wherein the additional filter is to limit the selected query to a subset of rows of the database contained within the index table. - View Dependent Claims (15, 16, 17, 18, 19)
-
Specification