Query optimization in a multi-tenant database system
First Claim
1. A method in a Multitenant Database System, the method comprising:
- receiving a request for access to privileged data via a sharing feature of the Multitenant Database System, the request received at an interface of the Multitenant Database System;
maintaining sharing information within a Many-to-Many table, wherein the Many-to-Many table specifies whether a user has access to the privileged data, and wherein tenant data for each of a plurality of tenants is arranged so that data of one tenant is kept separate from tenant data of other tenants, wherein the one tenant does not have access to another tenant'"'"'s data unless the tenant data of the one tenant is expressly shared;
maintaining tenant-level statistics for each of the plurality of tenants having data stored within the Multitenant Database System, the tenant-level statistics kept on a per-tenant basis separate from native statistics aggregated across the plurality of tenants of the Multitenant Database System;
generating a filtered sharing query designed to access the privileged data requested;
optimizing the filtered sharing query based on the tenant-level statistics and the sharing information maintained by the Many-to-Many table to determine a query plan that includes at least whether to access the Many-to-Many table from a user side or an entity side of the relationship to retrieve the privileged data requested; and
performing the optimized filtered sharing query.
0 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides techniques for managing process space on a multi-tenant database system that features a method that provides to multiple users of two or more organizations, over a network, access to information stored in a database repository shared by the two or more organizations. The database repository implements security protocols to restrict a set of first users to a first sub-portion of the information. The set of first users belongs to one of the two or more organizations. The first sub-portion of the information is different from a second sub-portion accessible by users from another organization. Access of the information by the multiple users is monitored. A first processing space for the set of first users is generated in response to the access of the database repository. The first processing space is distinct from a second processing space for the users from the other organization.
293 Citations
22 Claims
-
1. A method in a Multitenant Database System, the method comprising:
-
receiving a request for access to privileged data via a sharing feature of the Multitenant Database System, the request received at an interface of the Multitenant Database System; maintaining sharing information within a Many-to-Many table, wherein the Many-to-Many table specifies whether a user has access to the privileged data, and wherein tenant data for each of a plurality of tenants is arranged so that data of one tenant is kept separate from tenant data of other tenants, wherein the one tenant does not have access to another tenant'"'"'s data unless the tenant data of the one tenant is expressly shared; maintaining tenant-level statistics for each of the plurality of tenants having data stored within the Multitenant Database System, the tenant-level statistics kept on a per-tenant basis separate from native statistics aggregated across the plurality of tenants of the Multitenant Database System; generating a filtered sharing query designed to access the privileged data requested; optimizing the filtered sharing query based on the tenant-level statistics and the sharing information maintained by the Many-to-Many table to determine a query plan that includes at least whether to access the Many-to-Many table from a user side or an entity side of the relationship to retrieve the privileged data requested; and performing the optimized filtered sharing query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. A non-transitory medium storing program code that, when executed by a central processing unit of a Multitenant Database System, the program code causes the Multitenant Database System to perform operations including:
-
receiving a request for access to privileged data via a sharing feature of the Multitenant Database System, the request received at an interface of the Multitenant Database System; maintaining sharing information within a Many-to-Many table, wherein the Many-to-Many table specifies whether a user has access to the privileged data, and wherein tenant data for each of a plurality of tenants is arranged so that data of one tenant is kept separate from tenant data of other tenants, wherein the one tenant does not have access to another tenant'"'"'s data unless the tenant data of the one tenant is expressly shared; maintaining tenant-level statistics for each of the plurality of tenants having data stored within the Multitenant Database System, the tenant-level statistics kept on a per-tenant basis separate from native statistics aggregated across the plurality of tenants of the Multitenant Database System; generating a filtered sharing query designed to access the privileged data requested; optimizing the filtered sharing query based on the tenant-level statistics and the sharing information maintained by the Many-to-Many table to determine a query plan that includes at least whether to access the Many-to-Many table from a user side or an entity side of the relationship to retrieve the privileged data requested; and performing the optimized filtered sharing query.
-
-
22. A Multitenant Database System, comprising:
-
a database system including one or more data tables, each data table having one or more columns defining data categories and one or more rows associated with one or more tenants among a plurality of tenants having data stored within the data tables; a plurality of servers to store data to and retrieve data from the database system; an interface to receive a request for access to privileged data via a sharing feature of the Multitenant Database System, the request received at an interface of the Multitenant Database System; a Many-to-Many table to maintain sharing information, wherein the Many-to-Many table specifies whether a user has access to the privileged data, and wherein tenant data for each of a plurality of tenants is arranged so that data of one tenant is kept separate from tenant data of other tenants, wherein the one tenant does not have access to another tenant'"'"'s data unless the tenant data of the one tenant is expressly shared; a query optimizer to optimize a filtered sharing query designed to access the privileged data requested, wherein the query optimizer optimizes optimizing the filtered sharing query based on the tenant-level statistics and the sharing information maintained by the Many-to-Many table to determine a query plan that includes at least whether to access the Many-to-Many table from a user side or an entity side of the relationship to retrieve the privileged data requested; and wherein the plurality of servers to perform the optimized filtered sharing query.
-
Specification