IP Library Granted Patent US 9,189,519
Granted Patent B2
US 9,189,519 · App. 14/288,237 · Granted Nov 17, 2015

Executing database queries using multiple processors

Inventors: Santiago Becerra (Del Mar, CA); Santiago E. Becerra (Del Mar, CA); Alex C. Schaefer (Solana Beach, CA); John McInerney (La Mesa, CA); Patrick Cheng (San Diego, CA)
Assignee: MeLLmo Inc.
G06F17/30442G06F17/30463
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 9,189,519
App. No.
14/288,237
Granted
Nov 17, 2015
Kind
B2
Abstract

A system and a method are disclosed for efficiently executing database queries using a computing device that includes a central processing unit (CPU) and a processing unit based on single instruction multiple thread (SIMT) architecture, for example, a GPU. A query engine determines a target processing unit to execute a database query based on factors including the type and amount of data processed by the query, the complexity of the query, and the current load on the processing units. An intermediate executable representation generator generates an intermediate executable representation for executing a query on a database virtual machine. If the query engine determines that the database query should be executed on an SIMT based processing unit, a native code generator generates native code from the intermediate executable representation. The native code is optimized for execution using a particular processing unit.

Claims (61)

1. A method for executing database queries, comprising:

receiving a database query for execution by a database system, the database system configured to process database queries using a first processing unit including one or more central processing units (CPUs) and a second processing unit including one or more single instruction multiple thread (SIMT) based processing units;

generating, by the database system, an intermediate executable representation including code for processing the database query, the processing performed by executing operators representing portions of computations for processing the database query;

selecting, by the database system, a target processing unit for executing an operator of the database query based on factors comprising a data type of values stored in a column processed by the query;

responsive to selection of the second processing unit for executing the operator of the database query:

generating native code from the intermediate executable representation, wherein the native code is optimized for execution on the second processing unit;

compiling the native code to executable code; and

executing the executable code by the database system using the second processing unit; and

sending the result of execution of the query.

2. The method of claim 1 , wherein selecting the target processing unit for executing the operator of the database query comprises, selecting the second processing unit including one or more SIMT based processing units if the values stored in the column processed by the database query are determined to have a uniform size.

3. The method of claim 1 , wherein selecting the target processing unit for executing the operator of the database query comprises, selecting the first processing unit including one or more CPUs if the values stored in the column processed by the database query are one of: a binary large object or a character large object.

4. The method of claim 1 , wherein selecting the target processing unit for executing the operator of the database query comprises, selecting the second processing unit including one or more SIMT based processing units if the database query is determined sort records of the result of execution of the query.

5. The method of claim 1 , wherein selecting the target processing unit for executing the operator of the database query comprises, selecting the first processing unit including one or more CPUs if the values stored in the column processed by the database query are determined to be not word aligned.

6. The method of claim 1 , wherein selecting the target processing unit for executing the operator of the database query comprises, selecting the first processing unit including one or more CPUs if the values stored in the column processed by the database query are determined to be one of: bits, bytes, or shorts.

7. The method of claim 1 , further comprising:

determining that the values stored in the column processed by the database query are not word aligned;

padding the values stored in the column with extra bytes to align the data on word boundaries; and

responsive to padding the values stored in the column with extra bytes, the second processing unit including one or more SIMT based processing units for processing the operator of the database query.

8. The method of claim 1 , wherein the factors considered for selecting the target processing unit for executing the operator of the database query include an estimate of a complexity of the database query.

9. The method of claim 1 , wherein the factors considered for selecting the target processing unit for executing the operator of the database query include an estimate of a current amount of work on each of the first processing unit and the second processing unit.

10. The method of claim 1 , further comprising:

selecting the operator based on the type of processing unit selected for processing the database query.

11. The method of claim 1 , wherein the database query joins two or more database tables, the method further comprising:

determining a type of join operation used for processing the database query based on the type of processing unit selected.

12. The method of claim 11 , further comprising:

determining the type of join operation used for processing the database query to be hash join operation if the first processing unit is selected as the target processing unit.

13. The method of claim 11 , further comprising:

determining the type of join operation used for processing the database query to be sort-merge join operation if the second processing unit is selected as the target processing unit.

14. The method of claim 1 , further comprising:

sending the operator of the database query to both the first processing unit and the second processing unit; and

receiving a result of execution of the operator from the processing unit that finishes first.

15. The method of claim 14 , further comprising:

responsive to receiving the result of execution of the operator from the processing unit that finishes first, terminating execution of the operator of the database query on the other processing unit.

16. A computer readable non-transitory storage medium storing instructions for:

receiving a database query for execution by a database system, the database system configured to process database queries using a first processing unit including one or more central processing units (CPUs) and a second processing unit including one or more single instruction multiple thread (SIMT) based processing units;

generating, by the database system, an intermediate executable representation including code for processing the database query, the processing performed by executing operators representing portions of computations for processing the database query;

selecting, by the database system, a target processing unit for executing an operator of the database query based on factors comprising a data type of values stored in a column processed by the query;

responsive to selection of the second processing unit for executing the operator of the database query:

generating native code from the intermediate executable representation, wherein the native code is optimized for execution on the second processing unit;

compiling the native code to executable code; and

executing the executable code by the database system using the second processing unit; and

sending the result of execution of the query.

17. The computer readable non-transitory storage medium of claim 16 , wherein selecting the target processing units for executing the operator of the database query comprises:

selecting the second processing unit including one or more SIMT based processing units if the values stored in the column processed by the database query are determined to have a uniform size.

18. The computer readable non-transitory storage medium of claim 16 , wherein the database query joins two or more database tables, the computer readable non-transitory storage medium further storing instructions for:

determining a type of join operation used for processing the database query based on the type of processing unit selected.

19. The computer readable non-transitory storage medium of claim 16 , the computer readable non-transitory storage medium further storing instructions for:

sending the operator of the database query to both the first processing unit and the second processing unit;

receiving a result of execution of the operator from the processing unit that finishes first; and

responsive to the result of execution of the operator from the processing unit that finishes first, terminating execution of the operator of the database query on the other processing unit.

20. A computer system comprising:

a computer processor; and

a computer readable non-transitory storage medium storing instructions for execution by the computer processor, the instructions for:

receiving a database query for execution by a database system, the database system configured to process database queries using a first processing unit including one or more central processing units (CPUs) and a second processing unit including one or more single instruction multiple thread (SIMT) based processing units;

generating, by the database system, an intermediate executable representation including code for processing the database query, the processing performed by executing operators representing portions of computations for processing the database query;

selecting, by the database system, a target processing unit for executing an operator of the database query based on factors comprising a data type of values stored in a column processed by the query;

responsive to selection of the second processing unit for executing the operator of the database query:

generating native code from the intermediate executable representation, wherein the native code is optimized for execution on the second processing unit;

compiling the native code to executable code; and

executing the executable code by the database system using the second processing unit; and

sending the result of execution of the query.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 13, 2016
From: MELLMO INC.
To: SAP SE
Reel/Frame 038272/0046 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 10, 2015
From: BECERRA, SANTIAGO; BECERRA, SANTIAGO E.; SCHAEFER, ALEX C.; MCINERNEY, JOHN; CHENG, PATRICK
To: MELLMO INC.
Reel/Frame 036059/0778 →
Continuity (3)
Continuation 13835795 · Mar 15, 2013
Provisional Application 61762782 · Feb 8, 2013
Related Publication 20140337313A1 · Nov 13, 2014