IP Library Granted Patent US 12,468,708
Granted Patent B2
US 12,468,708 · App. 18/331,578 · Granted Nov 11, 2025

GPU-based database operators using the graphics pipeline

Inventors: Harish Doraiswamy (Karnataka, IN); Karthik Saligrama Ramachandra (Karnataka, IN); Jayant Ramaswamy Haritsa (Karnataka, IN)
Assignee: Microsoft Technology Licensing, LLC
G06F16/24556G06F16/24537G06F16/24544G06F16/2456G06F16/248G06T1/20
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 12,468,708
App. No.
18/331,578
Granted
Nov 11, 2025
Kind
B2
Abstract

The present disclosure relates to methods and systems for using the computer graphics pipeline to execute database query operations on a graphics processing unit (GPU). The methods and systems use the graphics pipeline to transform relational data into images of the relational data. The methods and systems use the graphics pipeline to perform relational database operations on the images in response to a query and output a query result for the database operations.

Claims (54)

1 . A method, comprising:

receiving a query with a relational database operation to perform on relational data;

using a graphics pipeline to perform the relational database operation on the relational data; and

outputting a query result of the relational database operation, wherein the graphics pipeline performs:

a build phase on the relational data to create a hash table of the relational data, wherein the hash table maps the relational data to a stack of two-dimensional (2D) images;

using a flag array to track which attribute values of the relational data are included in the stack of 2D images and which attribute values of the relational data needs processing;

continuing to perform the build phase until the flag array indicates that all the relational data is processed; and

a probe phase that performs the relational database operation by rendering the relational database operation on the hash table and outputting the query result.

2 . The method of claim 1 , wherein the graphics pipeline is executed by a graphics processing unit (GPU) and the graphics pipeline includes a vertex shader, vertex post processing, a fragment shader, and fragment processing.

3 . The method of claim 1 , wherein the relational database operation is an equi-join operation between a first input table of relational data and a second input table of relational data.

4 . The method of claim 3 , wherein the stack of 2D images is created for the first input table of relational data and each 2D image in the stack of 2D images is created in response to a hash collision for the relational data or duplicate attribute values of the relational data.

5 . The method of claim 4 , wherein the probe phase:

performs a lookup for each record in the second input table to each 2D image in the stack of 2D images to identify matches between the relational data in the second input table and attribute values of the relational data in the first input table;

converts the matches to pixels; and

performs post processing that applies color to the pixels indicating matching join records between the relational data in the first input table and the relational data in the second input table and the query result includes the pixels.

6 . The method of claim 1 , further comprising:

performing a count phase that determines an amount of graphics processing unit (GPU) memory required for the relational database operation; and

allocating the amount of GPU memory for the query result.

7 . The method of claim 1 , wherein the relational database operation is a group by operation on an input table of the relational data and each 2D image of the stack of 2D images is created in response to a hash collision for the relational data.

8 . The method of claim 7 , wherein the probe phase:

uses the stack of 2D images to map the relational data to positions defined by a grouping value;

generates pixels with the positions and the grouping values;

performs post processing that applies color to the pixels indicating an aggregate function and attribute values of the relational data; and

performs a blend function of the pixels based on the aggregation function and the query output includes the blended pixels.

9 . The method of claim 8 , wherein the aggregate function includes a count, a sum, a minimum, a maximum, or an average.

10 . The method of claim 1 , wherein the query result is provided to a central processing unit (CPU).

11 . A device, comprising:

a memory to store data and instructions; and

a graphics processing unit operable to communicate with the memory, wherein the graphics processing unit is operable to:

receive a query with a relational database operation to perform on relational data, wherein the relational database operation is an equi-join operation between a first input table of relational data and a second input table of relational data;

use a graphics pipeline to perform the relational database operation on the relational data by performing:

a build phase on the relational data to create a hash table of the relational data, wherein the hash table maps the relational data to a stack of two-dimensional (2D) images and the stack of 2D images is created for the first input table of relational data and each 2D image in the stack of 2D images is created in response to a hash collision for the relational data or duplicate attribute values of the relational data; and

a probe phase that performs the relational database operation by rendering the relational database operation on the hash table; and

output a query result of the relational database operation.

12 . The device of claim 11 , wherein the probe phase:

performs a lookup for each record in the second input table to each 2D image in the stack of 2D images to identify matches between the relational data in the second input table and attribute values of the relational data in the first input table;

converts the matches to pixels; and

performs post processing that applies color to the pixels indicating matching join records between the relational data in the first input table and the relational data in the second input table and the query result includes the pixels.

13 . The device of claim 11 , wherein the graphics pipeline includes a vertex shader, vertex post processing, a fragment shader, and fragment processing.

14 . The device of claim 11 , wherein the query result is provided to a central processing unit (CPU).

15 . A method, comprising:

receiving a query with a relational database operation to perform on relational data, wherein the relational database operation is a group by operation on an input table of the relational data;

using a graphics pipeline to perform the relational database operation on the relational data; and

outputting a query result of the relational database operation, wherein the graphics pipeline performs:

a build phase on the relational data to create a hash table of the relational data, wherein the hash table maps the relational data to a stack of two-dimensional (2D) images and each 2D image of the stack of 2D images is created in response to a hash collision for the relational data; and

a probe phase that performs the relational database operation by rendering the relational database operation on the hash table and outputting the query result.

16 . The method of claim 15 , wherein the probe phase:

uses the stack of 2D images to map the relational data to positions defined by a grouping value;

generates pixels with the positions and the grouping values;

performs post processing that applies color to the pixels indicating an aggregate function and attribute values of the relational data; and

performs a blend function of the pixels based on the aggregation function and the query output includes the blended pixels.

17 . The method of claim 16 , wherein the aggregate function includes a count, a sum, a minimum, a maximum, or an average.

18 . The method of claim 15 , wherein the graphics pipeline includes a vertex shader, vertex post processing, a fragment shader, and fragment processing.

19 . The method of claim 15 , wherein the graphics pipeline is executed by a graphics processing unit (GPU) and the graphics pipeline includes a vertex shader, vertex post processing, a fragment shader, and fragment processing.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 8, 2023
From: DORAISWAMY, HARISH; RAMACHANDRA, KARTHIK SALIGRAMA; HARITSA, JAYANT RAMASWAMY
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 063897/0528 →
Continuity (1)
Related Publication 20240411761A1 · Dec 12, 2024
References Cited (42)
US 6671407B1 · Venkatesan · 2003 [cited by examiner]
US 11361401B2 · Tu · 2022 [cited by examiner]
US 20090070315A1 · Ahmed · 2009 [cited by examiner]
US 20200125368A1 · Kaldewey · 2020 [cited by examiner]
Harish Doraiswamy et al., A Case for Graphics-Driven Query Processing, Proceedings of the VLDB Endowment, vol. 16, Issue 10, Jun. 2023, pp. 2499-2511. [cited by examiner]
Harish Doraiswamy et al., GPU-Powered Spatial Engine for Commodity Hardware: Extended Version, arXiv:2203.14362v1 [cs.DB], Mar. 27, 2022, pp. 1-29. [cited by examiner]
Johns Paul et al., GPL: A GPU-Based Pipelined Query Processing Engine, SIGMOD '16: Proceedings of the 2016 International Conference on Management of Data, Jun. 2016, pp. 1935-1950. [cited by examiner]
Bingsheng He et al., Relational Joins on Graphics Processors, SIGMOD '08: Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data, Jun. 2008, pp. 511-524. [cited by examiner]
Nathaniel Duca et al., A Relational Debugging Engine For The Graphics Pipeline, ACM Transactions on Graphics (TOG), vol. 24, Issue 3, Jul. 2005, pp. 453-463. [cited by examiner]
Naga K. Govindaraju et al., Fast Computation of Database Operations Using Graphics Processors, Proceedings of the ACM SIGMOD International Conference on Management of Data, Jun. 2004, pp. 206-217. [cited by examiner]
“Fowler-Noll-Vo hash function”, Retrieved from: https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function, Sep. 25, 2022, 5 Pages. [cited by applicant]
“Metal Framework”, Retrieved from: https://developer.apple.com/documentation/metal, Retrieved Date: Jan. 21, 2023, 6 Pages. [cited by applicant]
“Vulkan API”, Retrieved from: https://www.vulkan.org/, Retrieved Date: Jan. 21, 2023, 7 Pages. [cited by applicant]
Chrysogelos, Periklis, “Efficient Analytical Query Processing on CPU-GPU Hardware Platforms”, In Thesis of EPFL, Jul. 29, 2022, 132 Pages. [cited by applicant]
Dewitt, et al., “Implementation Techniques for Main Memory Database Systems”, In Proceedings of the SIGMOD International Conference on Management of Data, Jun. 18, 1984, 8 Pages. [cited by applicant]
Funke, et al., “Data-Parallel Query Processing on Non-Uniform Data”, In Proceedings of the VLDB Endowment, vol. 13, Issue 6, Mar. 2020, pp. 884-897. [cited by applicant]
Funke, et al., “Pipelined Query Processing in Coprocessor Environments”, n Proceedings of the International Conference on Management of Data, Jun. 10, 2018, pp. 1603-1618. [cited by applicant]
Govindaraju, et al., “Fast and Approximate Stream Mining of Quantiles and Frequencies Using Graphics Processors”, In Proceedings of ACM SIGMOD International Conference on Management of Data, Jun. 14, 2005, pp. 611-622. [cited by applicant]
Govindaraju, et al., “Fast Computation of Database Operations Using Graphics Processors”, In Proceedings of the Acm Sigmod International Conference on Management of Data, Jun. 13, 2004, 12 Pages. [cited by applicant]
Govindaraju, et al., “GPUTeraSort: High Performance Graphics Co-processor Sorting for Large Database Management”, In Proceedings of the Acm Sigmod international conference on Management of data, Jun. 27, 2006, pp. 325-3… [cited by applicant]
Gray, et al., “Data cube: A Relational Aggregation Operator Generalizing Group-by, Cross-tab, and Sub-totals”, In Journal of Data Mining and Knowledge Discovery, vol. 1, Issue 1, Mar. 1997, pp. 29-53. [cited by applicant]
Guo, “In-Memory Join Algorithms on GPUs for Large-Data”, In Proceedings of IEEE 21st International Conference on High Performance Computing and Communications; IEEE 17th International Conference on Smart City; IEEE 5th … [cited by applicant]
He, et al., “Relational Joins on Graphics Processors”, In Proceedings of the ACM SIGMOD International Conference on Management of Data, Jun. 9, 2008, pp. 511-524. [cited by applicant]
Kaldewey, et al., “GPU Join Processing Revisited”, In Proceedings of the 8th International Workshop on Data Management on New Hardware, May 21, 2012, pp. 55-62. [cited by applicant]
Karnagel, et al., “Optimizing GPU-accelerated Group-By and Aggregation”, In ADMS@ VLDB, vol. 8, Aug. 2015, pp. 1-12. [cited by applicant]
Kiao, UE, “Probability of Collision in Hash Function”, Retrieved from: https://iq.opengenus.org/probability-of-collision-in-hash/, Retrieved Date: Jan. 21, 2023, 10 Pages. [cited by applicant]
Lutz, et al., “Triton Join: Efficiently Scaling to a Large Join State on GPUs with Fast Interconnects”, In Proceedings of the International Conference on Management of Data, Jun. 2022, pp. 1017-1032. [cited by applicant]
Paul, et al., “Database Systems on GPUs”, In Journal of Foundations and Trends® in Databases, vol. 11, Issue 1, Jul. 2021, 43 Pages. [cited by applicant]
Rosenfeld, et al., “Performance Analysis and Automatic Tuning of Hash Aggregation on GPUs”, In Proceedings of the 15th International Workshop on Data Management on New Hardware, Jul. 2019, 11 Pages. [cited by applicant]
Rosenfeld, et al., “Query Processing on Heterogeneous CPU/GPU Systems”, In ACM Computing Surveys, vol. 55, Issue 1, Jan. 2022, pp. 1-38. [cited by applicant]
Rui, et al., “Efficient Join Algorithms For Large Database Tables in a Multi-GPU Environment”, In Proceedings of the VLDB Endowment, vol. 14, Issue 4, Dec. 1, 2020, pp. 708-720. [cited by applicant]
Rui, et al., “Fast Equi-Join Algorithms on GPUs: Design and Implementation”, In Proceedings of the 29th International Conference on Scientific and Statistical Database Management, Jun. 2017, 12 Pages. [cited by applicant]
Shanbhag, et al., “A Study of the Fundamental Performance Characteristics of GPUs and CPUs for Database Analytics”, In Proceedings of the ACM SIGMOD International Conference on Management of Data, Jun. 14, 2020, pp. 161… [cited by applicant]
Shreiner, et al., “OpenGL Programming Guide: The Official Guide to Learning OpenGL”, In Publication of Addison-Wesley Professional, Mar. 2013, 986 Pages. [cited by applicant]
Sioulas, et al., “Hardware-Conscious Hash-Joins on GPUs”, In Proceedings of IEEE 35th International Conference on Data Engineering (ICDE), Apr. 8, 2019, pp. 698-709. [cited by applicant]
Sun, et al., “Hardware acceleration for spatial selections and joins”, In Proceedings of the ACM SIGMOD international conference on Management of data, Jun. 2003, pp. 455-466. [cited by applicant]
Tome, et al., “Optimizing Group-By And Aggregation using GPU-CPU Co-Processing”, In InADMS@ VLDB, Jan. 1, 2018, 11 Pages. [cited by applicant]
White, et al., “DirectX programming”, Retrieved from: https://learn.microsoft.com/en-us/windows/uwp/gaming/directx-programming, Oct. 21, 2022, 1 Page. [cited by applicant]
Doraiswamy et al., “A Case for Graphics-Driven Query Processing,” Proceedings of the VLDB Endowment, Jun. 1, 2023, pp. 2499-2511. [cited by applicant]
Doraiswamy et al., “SPADE: GPU-Powered Spatial Database Engine for Commodity Hardware,” IEEE 38th International Conference on Data Engineering, May 9, 2022, pp. 2669-2681. [cited by applicant]
Govindaraju et al., “Fast Computation of Database Operations Using Graphics Processors,” ACM SIGGRAPH, Jul. 31, 2005, 12 Pages. [cited by applicant]
International Search Report and Written Opinion received for PCT Application No. PCT/US2024/032325, Aug. 6, 2024, 12 pages. [cited by applicant]