IP Library Granted Patent US 10,262,027
Granted Patent B2
US 10,262,027 · App. 14/802,144 · Granted Apr 16, 2019

Transforming queries in a multi-tenant database system

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,262,027
App. No.
14/802,144
Granted
Apr 16, 2019
Kind
B2
Abstract

In a method, system, and computer-readable medium having instructions for executing a query in a database system, a query request is received with a query predicate to filter data returned in response to the query request and the query predicate has a formula, the query request is transformed to a transformed query request by preprocessing the formula in the query predicate, and the query request is optimized using the transformed query request.

Claims (39)

1. A method for executing a query by a database system, the method comprising:

receiving a query request with a reference to a first database field in a query predicate, the query predicate comprising a formula referencing a second database field, the query request to filter data returned from the database system in response to the query request, the database system being shared by a plurality of organizations;

transforming the query request to a transformed query request by preprocessing the formula in the query predicate by replacing the reference to the first database field within the query request with at least one reference to the second database field, the at least one reference to the second database field including an index within the database system associated with one of the plurality of organizations; and

executing the query request using the transformed query request.

2. The method for executing a query by the database system of claim 1 , the method further comprising:

preprocessing the formula by performing an inverse function on a function within the formula.

3. The method for executing a query by the database system of claim 1 , the method further comprising:

applying an index to a database field referenced in the formula, wherein the index is for data of a tenant of the multi-tenant database.

4. The method for executing a query by the database system of claim 1 , wherein the formula has a nested formula and the formula is flattened during preprocessing.

5. The method for executing a query by the database system of claim 1 , the method further comprising:

preprocessing the formula by performing a range scan for the formula.

6. The method for executing a query by the database system of claim 1 , the method further comprising:

generating a SQL database request with the transformed query request.

7. A non-transitory computer-readable storage medium having one or more instructions thereon for executing a query in a database system, the instructions when executed by one or more processors causing the one or more processors to carry out:

receiving a query request with a reference to a first database field in a query predicate, the query predicate comprising a formula referencing a second database field, the query request to filter data returned from the database system in response to the query request, the database system being shared by a plurality of organizations;

transforming the query request to a transformed query request by preprocessing the formula in the query predicate by replacing the reference to the first database field within the query request with at least one reference to the second database field, the at least one reference to the second database field including an index within the database system associated with one of the plurality of organizations; and

executing the query request using the transformed query request.

8. The non-transitory computer-readable storage medium of claim 7 , the instructions further comprising:

preprocessing the formula by performing an inverse function on a function within the formula.

9. The non-transitory computer-readable storage medium of claim 7 , the instructions further comprising:

applying an index to a database field referenced in the formula, wherein the index is for data of a tenant of the multi-tenant database.

10. The non-transitory computer-readable storage medium of claim 7 , wherein the formula has a nested formula and the formula is flattened during preprocessing.

11. The non-transitory computer-readable storage medium of claim 7 , the instructions further comprising:

generating a SQL database request with the transformed query request.

12. A system for executing 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:

receiving a query request with a reference to a first database field in a query predicate, the query predicate comprising a formula referencing a second database field, the query request to filter data returned from the database system in response to the query request, the database system being shared by a plurality of organizations;

transforming the query request to a transformed query request by preprocessing the formula in the query predicate by replacing the reference to the first database field within the query request with at least one reference to the second database field, the at least one reference to the second database field including an index within the database system associated with one of the plurality of organizations; and

executing the query request using the transformed query request.

13. The system for executing a query in a database system of claim 12 , wherein the one or more stored sequences of instructions which, when executed by the processor, cause the processor to further carry out:

preprocessing the formula by performing an inverse function on a function within the formula.

14. The system for executing a query in a database system of claim 12 , wherein the one or more stored sequences of instructions which, when executed by the processor, cause the processor to further carry out:

applying an index to a database field referenced in the formula, wherein the index is for data of a tenant of the multi-tenant database.

15. The system for executing a query in a database system of claim 12 , wherein the formula has a nested formula and the formula is flattened during preprocessing.

16. The system for executing a query in a database system of claim 12 , wherein the one or more stored sequences of instructions which, when executed by the processor, cause the processor to further carry out:

generating a SQL database request with the transformed query request.

17. The system for executing a query in a database system of claim 12 , wherein the one or more stored sequences of instructions which, when executed by the processor, cause the processor to further carry out:

preprocessing the formula by performing a range scan for the formula.

Assignments (2)
CHANGE OF NAME Recorded Nov 21, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069430/0939 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 17, 2015
From: COLLINS, JESSE; BATHIJA, JAIKUMAR
To: SALESFORCE.COM, INC.
Reel/Frame 036122/0921 →