IP Library Granted Patent US 11,163,801
Granted Patent B2
US 11,163,801 · App. 16/826,673 · Granted Nov 2, 2021

Execution of queries in relational databases

Inventors: William Victor Gray (San Francisco, CA); Jan Asita Fernando (San Francisco, CA)
Assignee: salesforce.com, inc.
G06F16/284G06F16/22G06F16/245G06N20/00
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 11,163,801
App. No.
16/826,673
Granted
Nov 2, 2021
Kind
B2
Abstract

A learning system is provided to improve the speed of queries in a relational database management system. The learning system may include a query pipeline which utilizes a transform generator and a transform engine to transform uncommitted data corresponding to slow queries, and a query multiplexer to query primary keys of uncommitted data and committed data if the query has been improved by an existing transform.

Claims (66)

1. A method for processing a query, the method comprising:

determining, by a processor, if a first transform has been applied to the query;

processing, by the processor and based on a determination that the first transform has not been applied to the query, the query on uncommitted data in a relational database store;

determining, by the processor, if an execution speed of the query was less than a threshold speed; and

applying, by the processor and based on a determination that the execution speed was less than the threshold speed, a second transform to the query and to at least some of the uncommitted data.

2. The method of claim 1 , wherein the applying the second transform comprises defining a row key based on one or more predicates of the query.

3. The method of claim 2 , wherein the applying the second transform further comprises defining the second transform based on the row key and an entity shape.

4. The method of claim 3 , wherein the applying the second transform further comprises backfilling historical data in a key-value store.

5. The method of claim 1 , wherein the applying the second transform further comprises storing a timestamp of earliest uncommitted data received from the relational database store to set a time limit for data to be transformed by the second transform to avoid re-processing of committed data.

6. The method of claim 5 , wherein the applying the second transform further comprises:

transforming previously uncommitted data including the earliest uncommitted data; and

committing the previously uncommitted data.

7. The method of claim 6 , further comprising:

determining that transforming the previously uncommitted data is successful based on a response from a key-value store indicating that the previously uncommitted data has been saved in the key-value store; and

updating the timestamp for the committed data based on a determination that the transforming the previously uncommitted data is successful.

8. The method of claim 6 , further comprising:

determining that the transforming the previously uncommitted data is unsuccessful based on not receiving the response from the key-value store indicating that the previously uncommitted data has been saved in the key-value store; and

based upon being unsuccessful:

obtaining a second timestamp of the earliest uncommitted data;

transforming the previously uncommitted data; and

committing the previously uncommitted data.

9. The method of claim 1 , wherein the processing the query on the uncommitted data in the relational database store further comprises:

querying the relational database store for primary keys of the uncommitted data.

10. The method of claim 9 , wherein the processing the query on the uncommitted data in the relational database store further comprises:

obtaining a second plurality of primary keys of the uncommitted data in the relational database store.

11. The method of claim 10 , wherein the processing the query on the uncommitted data in the relational database store further comprises:

merging primary keys of committed data and the second plurality of primary keys of the uncommitted data to generate a set of merged primary keys.

12. The method of claim 11 , wherein the processing the query on the uncommitted data in the relational database store further comprises:

merging the uncommitted data and the committed data to generate merged data.

13. The method of claim 11 , wherein the threshold speed is selected from a group consisting of:

a fixed threshold speed and

a dynamic threshold speed.

14. A system for improving execution speeds of queries in a database, the system comprising:

a processor; and

a memory communicably coupled to the processor, the memory including computer instructions configured to cause the processor to:

determine whether a first transform has been applied to a query;

process the query on uncommitted data in a relational database store based on a determination that the first transform has not been applied to the query;

determine if an execution speed of the query was less than a threshold speed; and

apply a second transform to the query and to at least some of the uncommitted data based on a determination that the execution speed was less than the threshold speed.

15. The system of claim 14 , wherein the computer instructions further comprise computer instructions to cause the processor to:

define a row key based on one or more predicates of the query; and

define the second transform based on the row key and an entity shape.

16. The system of claim 15 , wherein the computer instructions further comprise computer instructions to cause the processor to:

transform previously uncommitted data; and

commit the previously uncommitted data.

17. The system of claim 16 , wherein the computer instructions further comprise computer instructions to cause the processor to:

obtain transform metadata for the first transform;

generate a row key based on the transform metadata;

obtain a first plurality of primary keys of committed data in a key-value store;

obtain a second plurality of primary keys of the uncommitted data in the relational database store; and

merge the first plurality of primary keys of the committed data and the second plurality of primary keys of the uncommitted data to generate a set of merged primary keys.

18. A system for improving execution speeds of queries in a database, the system comprising:

a processor configured to:

determine whether a first transform has been applied to a query;

process the query on uncommitted data in a relational database store based on a determination that the first transform has not been applied to the query;

determining whether an execution speed of the query was less than a threshold speed; and

apply a second transform to the query and to at least some of the uncommitted data based on a determination that the execution speed was less than the threshold speed.

19. The system of claim 18 , wherein the processor is further configured to:

obtain transform metadata for the first transform;

generate a row key based on the transform metadata;

obtain a first plurality of primary keys of committed data in a key-value store;

obtain a second plurality of primary keys of the uncommitted data in the relational database store; and

merge the first plurality of primary keys of the committed data and the second plurality of primary keys of the uncommitted data to generate a set of merged primary keys.

20. The system of claim 18 , wherein the processor is configured to:

define a row key based on one or more predicates of the query; and

define the second transform based on the row key and an entity shape.

Assignments (2)
CHANGE OF NAME Recorded Dec 18, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069717/0480 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 23, 2020
From: GRAY, WILLIAM VICTOR; FERNANDO, JAN ASITA
To: SALESFORCE.COM, INC.
Reel/Frame 052194/0191 →
Continuity (2)
Continuation 15138704 · Apr 26, 2016
Related Publication 20200226153A1 · Jul 16, 2020