IP Library Granted Patent US 10,621,207
Granted Patent B2
US 10,621,207 · App. 15/138,704 · Granted Apr 14, 2020

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 10,621,207
App. No.
15/138,704
Granted
Apr 14, 2020
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 (63)

1. A method of processing queries in a database, the method comprising:

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

processing the query on committed data in a key-value store or on uncommitted data in a relational database store based on a determination that the first transform has been applied to the query;

determining whether an execution speed of the query is slower than a threshold speed based on a determination that the first transform has not been applied to the query; and

applying a second transform to the query and to at least some of the uncommitted data based on a determination that the query is slower than the threshold speed.

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 the 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 the 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 a success based on a response from the key-value store indicating that the previously uncommitted data has been saved in the key-value store; and

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

8. The method of claim 6 , further comprising:

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

based upon the failure:

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 committed data in the key-value store or on the uncommitted data in the relational database store based on the determination that the first transform has been applied to the query comprises:

obtaining transform metadata for the first transform;

generating a row key based on the transform metadata; and

obtaining a first plurality of primary keys of the committed data in the key-value store.

10. The method of claim 9 , wherein the processing the query on the committed data in the key-value store or on the uncommitted data in the relational database store based on the determination that the first transform has been applied to the query 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 committed data in the key-value store or on the uncommitted data in the relational database store based on the determination that the first transform has been applied to the query further comprises merging 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.

12. The method of claim 11 , wherein the processing the query on the committed data in the key-value store or on the uncommitted data in the relational database store based on the determination that the first transform has been applied to the query further comprises merging the uncommitted data and the committed data to generate merged data.

13. The method of claim 1 , 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 committed data in a key-value store or on uncommitted data in a relational database store based on a determination that the first transform has been applied to the query;

determine whether an execution speed of the query is slower than a threshold speed based on a determination that the first transform has not been applied to the query; and

apply a second transform to the query and to at least some of the uncommitted data based on a determination that the query is slower 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 the committed data in the 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 an execution speed of a query has been improved with a first transform;

process the query on committed data in a key-value store or on uncommitted data in a relational database store based on a determination that the execution speed of the query has been improved with the first transform;

determine whether the execution speed of the query is slower than a threshold speed based on a determination that the execution speed of the query has not been improved with the first transform; and

improve the execution speed of the query with a second transform based on a determination that the query is slower than the threshold speed, wherein the second transform is applied to at least some of the uncommitted data.

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 the committed data in the 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 Nov 21, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069431/0007 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 26, 2016
From: GRAY, WILLIAM VICTOR; FERNANDO, JAN ASITA
To: SALESFORCE.COM, INC.
Reel/Frame 038385/0068 →
Continuity (1)
Related Publication 20170308604A1 · Oct 26, 2017