IP Library Granted Patent US 11,468,043
Granted Patent B1
US 11,468,043 · App. 16/542,146 · Granted Oct 11, 2022

Batching database queries for migration to a different database

Inventors: Florian Michael Waas (San Francisco, CA); Dmitri Korablev (San Francisco, CA); Lyublena Rosenova Antova (Sunnyvale, CA); Mohamed Soliman (Foster City, CA); Michael Alexander Duller (San Francisco, CA)
Assignee: DATOMETRY, INC.
G06F16/2379G06F16/214G06F16/2455G06F16/24528
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,468,043
App. No.
16/542,146
Granted
Oct 11, 2022
Kind
B1
Abstract

For multiple queries written for a first database, some embodiments provide a method of processing the queries on a second database. From a client, the method receives individually each of the multiple queries written for the first database. The method performs an automated process to analyze properties of the second database to determine that the multiple queries can be replaced by a single query to the second database. Based on the determination, the method combines the multiple queries to generate a single query for the second database. The method forwards the generated single query to the second database for execution.

Claims (29)

1. For a first plurality of queries written for a first database of a first database type associated with a first query format, a method of processing the queries on a second database of a second, different database type associated with a second, different query format, the method comprising:

after data is migrated from the first database to the second database, receiving, from a client, individually each of the first plurality of queries written for the first database in a first query format;

retrieving properties of the second database from a metadata storage;

performing an automated process to analyze the retrieved properties of the second database to determine that the first plurality of queries can be replaced by a single query to the second database;

based on the determination, combining the first plurality of queries to generate a single query for the second database in the second query format by performing a query interpretation operation on the received first plurality of queries, the query interpretation operation comprising (i) translating the first plurality of queries from the first query format into a second plurality of queries in a third query format that is not associated with any database type, (2) combining the second plurality of queries into a single query in the third query format, and (3) translating the combined single query from the third query format into the second query format; and

forwarding the generated single query to the second database for execution.

2. The method of claim 1 , wherein the client sends each query of the first plurality of queries as a separate transaction intended for separate execution on the first database, wherein the generated single query is executed as a single transaction on the second database.

3. The method of claim 2 , wherein each separate transaction requires a first amount of resources to execute on the first database, wherein the single transaction requires a second amount of resources to execute on the second database.

4. The method of claim 3 , wherein the second amount is smaller than or equal to the first amount.

5. The method of claim 3 , wherein the second amount is (i) greater than the first amount and (ii) smaller than a third amount, the third amount defined by multiplying the first amount by the number of separate transactions.

6. The method of claim 3 , wherein the resources comprise a time for completion of the transactions.

7. The method of claim 1 , wherein the client expects a separate response to each individually received query, the method further comprising:

receiving a particular reply from the second database in response to the generated single query;

generating from the particular reply a plurality of replies, each generated reply corresponding to one of the individually received queries; and

individually forwarding the plurality of replies to the client.

8. The method of claim 1 , wherein the first and second database types are each a different one of Teradata, Oracle, PostgreSQL, Amazon Redshift, Microsoft Azure SQL Data Warehouse, PostgreSQL, Pivotal Greenplum, Google BigQuery, Apache Impala, and Snowflake.

9. The method of claim 1 , wherein the metadata storage is a key-value storage in the second database.

10. The method of claim 1 , wherein the properties comprise at least one of a timeout value for a single transaction and a maximum number of transactions, wherein combining the plurality of received queries is based on using at least one of the timeout value and the maximum number of transactions.

11. For a first plurality of queries written for a first database of a first database type associated with a first query format, a non-transitory machine readable medium storing a program which when executed by at least one processing unit, processes the queries on a second database of a second, different database type associated with a second, different query format, the program comprising sets of instructions for:

from a client, receiving individually each of the first plurality of queries written for the first database in a first query format;

performing an automated process to analyze properties of the second database to determine that the first plurality of queries can be replaced by a single query to the second database;

based on the determination, combining the first plurality of queries to generate a single query for the second database in the second query format by performing a query interpretation operation on the received first plurality of queries, the query interpretation operation comprising (i) translating the first plurality of queries from the first query format into a second plurality of queries in a third query format that is not associated with any database type, (2) combining the second plurality of queries into a single query in the third query format, and (3) translating the combined single query from the third query format into the second query format; and

forwarding the generated single query to the second database for execution.

12. The non-transitory machine readable medium of claim 11 , wherein the client sends each query of the first plurality of queries as a separate transaction intended for separate execution on the first database, wherein the generated single query is executed as a single transaction on the second database, wherein each separate transaction requires a first amount of resources to execute on the first database, wherein the single transaction requires a second amount of resources to execute on the second database.

13. The non-transitory machine readable medium of claim 11 , wherein the client expects a separate response to each individually received query, the program further comprising sets of instructions for:

receiving a particular reply from the second database in response to the generated single query;

generating from the particular reply a plurality of replies, each generated reply corresponding to one of the individually received queries; and

individually forwarding the plurality of replies to the client.

14. The non-transitory machine readable medium of claim 11 , wherein each query in the received plurality of queries is in the first query format, wherein the generated single query is in the second query format.

Assignments (3)
CONFIRMATORY ASSIGNMENT Recorded Feb 26, 2026
From: DATOMETRY, INC.
To: SNOWFLAKE INC.
Reel/Frame 074957/0656 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 9, 2022
From: ANTOVA, LYUBLENA ROSENOVA
To: DATOMETRY, INC.
Reel/Frame 059210/0078 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 8, 2019
From: WAAS, FLORIAN MICHAEL; KORABLEV, DMITRI; ANTOVA, LYUBLENA ROSENOVA; SOLIMAN, MOHAMED; DULLER, MICHAEL ALEXANDER
To: DATOMETRY, INC.
Reel/Frame 050961/0816 →
Continuity (2)
Provisional Application 62807728 · Feb 19, 2019
Provisional Application 62782713 · Dec 20, 2018