Optimizing queries in a multi-tenant database system environment
First Claim
1. A method for optimizing a query in a database system, the method comprising:
- generating a database statistic for a number of related records for one or more entities for at least one tenant, wherein a related record comprises a record with a relationship to a shared record in a database table for an entity from the one or more entities;
calculating a first cost for accessing the number of related records for at least one tenant;
calculating a second cost for accessing a number of related records accessible to a user;
performing a comparison of the first cost to the second cost to determine a data access path for retrieving accessible related records; and
determining the data access path for retrieving accessible related records based upon the comparison.
1 Assignment
0 Petitions
Accused Products
Abstract
In a method, system, and computer-readable medium having instructions for optimizing a query in a database system, a database statistic is generated for a number of related records for one or more entities for at least one tenant and a related record is a record with a relationship to a shared record in a database table for an entity from the one or more entities, a first cost is calculated for accessing the number of related records for at least one tenant, a second cost is calculated for accessing a number of related records accessible to a user, a comparison of the first cost to the second cost is performed to determine a data access path for retrieving accessible related records, and the data access path for retrieving accessible related records is determined based upon the comparison.
139 Citations
20 Claims
-
1. A method for optimizing a query in a database system, the method comprising:
-
generating a database statistic for a number of related records for one or more entities for at least one tenant, wherein a related record comprises a record with a relationship to a shared record in a database table for an entity from the one or more entities; calculating a first cost for accessing the number of related records for at least one tenant; calculating a second cost for accessing a number of related records accessible to a user; performing a comparison of the first cost to the second cost to determine a data access path for retrieving accessible related records; and determining the data access path for retrieving accessible related records based upon the comparison. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer-readable storage medium having one or more instructions thereon for optimizing a query in a database system, the instructions when executed by one or more processors causing the one or more processors to carry out:
-
generating a database statistic for a number of related records for one or more entities for at least one tenant, wherein a related record comprises a record with a relationship to a shared record in a database table for an entity from the one or more entities; calculating a first cost for accessing the number of related records for at least one tenant; calculating a second cost for accessing a number of related records accessible to a user; performing a comparison of the first cost to the second cost to determine a data access path for retrieving accessible related records; and determining the data access path for retrieving accessible related records based upon the comparison. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A system for optimizing a query in a database system, the system comprising:
-
a processor; and one or more stored sequences of instructions which, when executed by the processor, cause the processor to carry out; generating a database statistic for a number of related records for one or more entities for at least one tenant, wherein a related record comprises a record with a relationship to a shared record in a database table for an entity from the one or more entities; calculating a first cost for accessing the number of related records for at least one tenant; calculating a second cost for accessing a number of related records accessible to a user; performing a comparison of the first cost to the second cost to determine a data access path for retrieving accessible related records; and determining the data access path for retrieving accessible related records based upon the comparison. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification