IP Library Granted Patent US 11,429,607
Granted Patent B2
US 11,429,607 · App. 17/024,790 · Granted Aug 30, 2022

Machine language query management for low-latency database analysis system

Inventors: Ashok Anand (Bengaluru, IN); Satyam Shekhar (San Jose, CA); Prateek Gaur (Mountain View, CA); Amit Prakash (Saratoga, CA)
Assignee: ThoughtSpot, Inc.
G06F16/24539G06F16/242G06F16/248G06F16/24552G06F16/27
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,429,607
App. No.
17/024,790
Granted
Aug 30, 2022
Kind
B2
Abstract

Data-query execution with distributed machine-language query management in a low-latency database analysis system may include obtaining, at a distributed in-memory database, a data-query expressing a request for data in a defined structured query language associated with the distributed in-memory database, automatically generating a high-level language query representing at least a portion of the data-query, obtaining a machine language query corresponding to the high-level language query, executing the machine language query to obtain results data, and outputting the results data. Obtaining the machine language query may include determining whether the machine language query is cached, and in response to a determination that the machine language query is unavailable, sending a request for the machine language query to a distributed machine-language-query management instance.

Claims (111)

1. A method comprising:

obtaining, at a distributed in-memory database of a low-latency database analysis system, a data-query expressing a request for data in a defined structured query language associated with the distributed in-memory database;

automatically, by an in-memory database instance of the distributed in-memory database, generating a high-level language query representing at least a portion of the data-query;

obtaining, by the in-memory database instance, a machine language query corresponding to the high-level language query, wherein obtaining the machine language query includes:

determining whether a cached machine language query corresponding to the machine language query is available, wherein determining whether the cached machine language query is available includes determining whether the cached machine language query is cached in an in-memory cache of the in-memory database instance;

in response to a determination that the cached machine language query is available, obtaining the cached machine language query as the machine language query;

in response to a determination that the cached machine language query is unavailable, sending a request for the machine language query to a machine-language-query management instance of the low-latency database analysis system;

in response to a determination that the machine language query is available from the machine-language-query management instance, obtaining the machine language query from the machine-language-query management instance; and

in response to a determination that the machine language query is unavailable from the machine-language-query management instance, obtaining the machine language query by generating the machine language query;

executing, by the in-memory database instance, the machine language query to obtain results data; and

outputting the results data.

2. The method of claim 1 , wherein obtaining the cached machine language query includes:

in response to a determination that the in-memory cache of the in-memory database instance includes the cached machine language query, obtaining the cached machine language query from the in-memory cache of the in-memory database instance.

3. The method of claim 1 , wherein:

obtaining the machine language query includes generating, by the in-memory database instance, a hash value for the high-level language query;

determining whether the machine language query is cached in the in-memory cache of the in-memory database instance includes determining whether the machine language query is cached in the in-memory cache of the in-memory database instance using the hash value; and

sending the request includes identifying the machine-language-query management instance using the hash value.

4. The method of claim 1 , wherein obtaining the cached machine language query includes:

in response to a determination that the in-memory cache of the in-memory database instance omits the cached machine language query, sending a request for the cached machine language query to a persistent cache of the low-latency database analysis system; and

in response to a determination that the cached machine language query is available from the persistent cache, obtaining the cached machine language query from the persistent cache.

5. The method of claim 4 , wherein sending the request for the cached machine language query to the persistent cache includes including the high-level language query in the request for the cached machine language query.

6. The method of claim 4 , wherein obtaining the machine language query includes:

in response to a determination that the cached machine language query is unavailable from the persistent cache and in response to obtaining the machine language query, caching the machine language query in the persistent cache, by the in-memory database instance.

7. The method of claim 1 , wherein obtaining the machine language query includes:

in response to a determination that the in-memory cache of the in-memory database instance omits the cached machine language query and in response to obtaining the machine language query, by the in-memory database instance, caching the machine language query in the in-memory cache of the in-memory database instance.

8. The method of claim 1 , wherein sending the request for the machine language query includes sending the request for the machine language query such that:

in response to determining that the request for the machine language query omits a hash value for the high-level language query, the machine-language-query management instance generates the hash value for the high-level language query.

9. The method of claim 1 , wherein sending the request for the machine language query includes sending the request for the machine language query such that:

in response to accessing the request for the machine language query, the machine-language-query management instance:

determines whether the cached machine language query is available, wherein to determine whether the cached machine language query is available, the machine-language-query management instance determines whether the cached machine language query is cached in an in-memory cache of the machine-language-query management instance;

in response to a determination by the machine-language-query management instance that the cached machine language query is available, obtains the cached machine language query as the machine language query;

in response to a determination by the machine-language-query management instance that the cached machine language query is unavailable:

obtains the machine language query by generating the machine language query; and

in response to obtaining the machine language query, caches the machine language query in the in-memory cache of the machine-language-query management instance;

in response to a determination the machine language query is unavailable, outputs a response indicating that the machine language query is unavailable in response to the request for the machine language query; and

in response to obtaining the machine language query, outputs the machine language query in response to the request for the machine language query.

10. The method of claim 9 , wherein sending the request for the machine language query includes sending the request for the machine language query such that:

in response to a determination that the cached machine language query is cached in the in-memory cache of the machine-language-query management instance, the machine-language-query management instance obtains the cached machine language query from the in-memory cache of the machine-language-query management instance.

11. The method of claim 9 , wherein sending the request for the machine language query includes sending the request for the machine language query such that:

to obtain the cached machine language query, the in-memory cache of the machine-language-query management instance:

in response to a determination that the in-memory cache of the machine-language-query management instance omits the cached machine language query, sends a request for the cached machine language query to a persistent cache of the low-latency database analysis system; and

in response to a determination that the cached machine language query is available from the persistent cache, obtains the cached machine language query from the persistent cache.

12. The method of claim 11 , wherein sending the request for the machine language query includes sending the request for the machine language query such that:

to obtain the cached machine language query, the in-memory cache of the machine-language-query management instance:

in response to a determination that the cached machine language query is unavailable from the persistent cache and in response to obtaining the machine language query, caches the machine language query in the persistent cache.

13. The method of claim 11 , wherein sending the request for the machine language query includes sending the request for the machine language query such that:

in response to accessing the request for the machine language query, the machine-language-query management instance obtains a hash value for the high-level language query, wherein to obtain the hash value, the machine-language-query management instance:

in response to a determination that the request for the machine language query includes the hash value, obtains the hash value from the request for the machine language query; and

in response to a determination that the request for the machine language query omits the hash value, generates the hash value; and

in response to obtaining the hash value, to determine whether the machine language query is cached in the in-memory cache of the machine-language-query management instance, the machine-language-query management instance determines whether the machine language query is cached in the in-memory cache of the machine-language-query management instance using the hash value.

14. The method of claim 13 , wherein sending the request for the machine language query includes sending the request for the machine language query such that:

in response to accessing the request for the machine language query and in response to obtaining the hash value, the machine-language-query management instance obtains a lock based on the hash value.

15. The method of claim 11 , wherein sending the request for the machine language query includes sending the request for the machine language query such that:

in response to accessing the request for the machine language query and in response to obtaining the machine language query, the machine-language-query management instance outputs the machine language query in response to the request for the machine language query, wherein, to output the machine language query the machine-language-query management instance:

outputs the machine language query to the in-memory database instance of the distributed in-memory database; and

outputs the machine language query to another in-memory database instance of the distributed in-memory database.

16. A method comprising:

accessing, by a machine-language-query management instance of a low-latency database analysis system, a first request for a machine language query corresponding to a high-level language query representing at least a portion of a data-query expressing a request for data in a defined structured query language associated with a distributed in-memory database of the low-latency database analysis system;

automatically obtaining, by the machine-language-query management instance, the machine language query, wherein obtaining the machine language query includes:

determining whether the machine language query is cached in an in-memory cache of the machine-language-query management instance;

in response to a determination that the in-memory cache of the machine-language-query management instance includes the machine language query, obtaining the machine language query from the in-memory cache of the machine-language-query management instance; and

in response to a determination that the in-memory cache of the machine-language-query management instance omits the machine language query:

sending a second request for the machine language query to a persistent cache of the low-latency database analysis system;

in response to a determination that the machine language query is unavailable from the persistent cache:

obtaining the machine language query by generating the machine language query; and

in response to obtaining the machine language query, caching the machine language query in the persistent cache;

in response to a determination that the machine language query is available from the persistent cache, obtaining the machine language query from the persistent cache; and

in response to obtaining the machine language query, caching the machine language query in the in-memory cache of the machine-language-query management instance;

in response to a determination the machine language query is unavailable, outputting a response indicating that the machine language query is unavailable in response to the first request; and

in response to obtaining the machine language query, outputting the machine language query in response to the first request.

17. The method of claim 16 , wherein:

obtaining the machine language query includes obtaining, by the machine-language-query management instance, a hash value for the high-level language query, wherein obtaining the hash value includes:

in response to a determination that the first request includes the hash value, obtaining the hash value from the first request; and

in response to a determination that the first request omits the hash value, obtaining the hash value by generating the hash value;

determining whether the machine language query is cached in the in-memory cache of the machine-language-query management instance includes determining whether the machine language query is cached in the in-memory cache of the machine-language-query management instance using the hash value; and

sending the second request includes including the hash value in the second request.

18. The method of claim 17 , wherein obtaining the machine language query includes:

in response to obtaining the hash value, obtaining a lock based on the hash value.

19. The method of claim 16 , wherein outputting the machine language query in response to the first request includes:

outputting the machine language query to a first in-memory database instance of the distributed in-memory database, wherein the first in-memory database instance generated the first request; and

outputting the machine language query to a second in-memory database instance of the distributed in-memory database.

20. A low-latency database analysis system including;

a distributed in-memory database;

an in-memory database instance of the distributed in-memory database;

a persistent cache; and

a machine-language-query management instance;

wherein:

the in-memory database instance is configured to:

obtain a data-query expressing a request for data in a defined structured query language associated with the distributed in-memory database;

automatically generate a high-level language query representing at least a portion of the data-query;

obtain a machine language query corresponding to the high-level language query, wherein, to obtain the machine language query, the in-memory database instance is configured to:

determine whether the machine language query is cached in an in-memory cache of the in-memory database instance;

in response to a determination that the in-memory cache of the in-memory database instance includes the machine language query, obtain the machine language query from the in-memory cache of the in-memory database instance;

in response to a determination that the in-memory cache of the in-memory database instance omits the machine language query, send a first request for the machine language query to the persistent cache;

in response to a determination that the machine language query is available from the persistent cache, obtain the machine language query from the persistent cache;

in response to a determination that the machine language query is unavailable from the persistent cache, send a second request for the machine language query to the machine-language-query management instance;

in response to a determination that the machine language query is available from the machine-language-query management instance, obtain the machine language query from the machine-language-query management instance;

in response to a determination that the machine language query is unavailable from the machine-language-query management instance; obtain the machine language query by generating the machine language query;

execute the machine language query to obtain results data; and

output the results data; and

the machine-language-query management instance is configured to:

access the second request;

in response to accessing the second request, automatically obtain the machine language query, wherein, to obtain the machine language query, the machine-language-query management instance is configured to:

determine whether the machine language query is cached in an in-memory cache of the machine-language-query management instance;

in response to a determination that the in-memory cache of the machine-language-query management instance includes the machine language query, obtain the machine language query from the in-memory cache of the machine-language-query management instance; and

in response to a determination that the in-memory cache of the machine-language-query management instance omits the machine language query, obtain the machine language query by generating the machine language query;

in response to a determination the machine language query is unavailable, output, to the in-memory database instance, a message indicating that the machine language query is unavailable; and

in response to obtaining the machine language query:

cache the machine language query in the persistent cache;

cache the machine language query in the in-memory cache of the machine-language-query management instance; and

output the machine language query to the in-memory database instance.

Assignments (2)
SECURITY INTEREST Recorded Mar 7, 2025
From: THOUGHTSPOT, INC.; THOUGHTSPOT, LLC
To: TRIPLEPOINT CAPITAL LLC
Reel/Frame 070442/0499 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 13, 2020
From: ANAND, ASHOK; SHEKHAR, SATYAM; GAUR, PRATEEK; PRAKASH, AMIT
To: THOUGHTSPOT, INC.
Reel/Frame 054039/0316 →
Continuity (2)
Provisional Application 62903114 · Sep 20, 2019
Related Publication 20210089530A1 · Mar 25, 2021
Cited By (5)
US 12,430,330 US 12,530,349 US 12,572,755 US 12,608,373 US 12,699,692