IP Library › Granted Patent US 9,760,599
Granted Patent B2
US 9,760,599 · App. 14/248,492 · Granted Sep 12, 2017

Group-by processing for data containing singleton groups

Inventor: Garth A. Dickie (Framingham, MA)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F17/30412G06F17/30371
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,760,599
App. No.
14/248,492
Granted
Sep 12, 2017
Kind
B2
Abstract

According to one embodiment of the present invention, a system performs a grouping operation for a database query. The system assigns data elements to groups and aggregates information for a group in response to assigning the group two or more data elements. The system passes the aggregated information for a group of two or more data elements for processing in accordance with the query, and passes information for a data element of a single-member group in a received form for processing in accordance with the query. Embodiments of the present invention further include a method and computer program product for grouping data elements in substantially the same manners described above.

Claims (32)

1. A system for performing a GROUP BY operation for a database query comprising:

at least one processor and memory configured to perform:

receiving one or more blocks of data elements, wherein each of the data elements comprises compressed information;

assigning the data elements to groups to form one or more single-member groups and one or more plural-member groups, wherein the assigning of the data elements comprises:

assigning a first data element of the data elements to a new group to form a single-member group and storing a pointer to a received block containing the first data element; and

assigning a second data element of the data elements to an existing group to form a plural-member group, decompressing compressed information of data elements assigned to the plural-member group, and forming aggregated information for the plural-member group from the decompressed information;

passing the aggregated information for each plural-member group for query processing; and

passing the compressed information of the first data element of the single-member group for query processing.

2. The system of claim 1 , wherein the GROUP BY is specified by a Structured Query Language statement containing a GROUP BY clause.

3. The system of claim 1 , wherein a first block of data elements contains a data element belonging to the plural-member group, and the forming of the aggregated information for the plural-member group comprises forming aggregated information for each group having a data element in the first block of data elements.

4. The system of claim 1 , wherein a first block of data elements comprises a data element belonging to the plural-member group, and the at least one processor and memory are further configured to perform:

maintaining a presence indicator of each of the data elements within the first block; and

removing the presence indicator for the data element having membership in the plural-member group.

5. The system of claim 4 , wherein the passing of the compressed information comprises passing presence information and compressed information for each of the data elements of the first block.

6. The system of claim 1 , wherein the assigning of the data elements to groups includes:

applying data of the data elements of the received one or more blocks to an associative array to determine database object elements within a same aggregation bucket from among a plurality of aggregation buckets based on one or more aggregation keys specified by a query.

7. A computer program product for performing a GROUP BY operation for a database query comprising:

a computer readable storage medium having computer readable program code embodied therewith for execution on a processing system, the computer readable program code comprising computer readable program code configured to be executed by the processing system to perform:

receiving one or more blocks of data elements, wherein each of the data elements comprises compressed information;

assigning the data elements to groups to form one or more single-member groups and one or more plural-member groups, wherein the assigning of the data elements comprises:

assigning a first data element of the data elements to a new group to form a single-member group and storing a pointer to a received block containing the first data element; and

assigning a second data element of the data elements to an existing group to form a plural-member group, decompressing compressed information of data elements assigned to the plural-member group, and forming aggregated information for the plural-member group from the decompressed information;

passing the aggregated information for each plural-member group for query processing; and

passing the compressed information of the first data element of the single-member group for query processing.

8. The computer program product of claim 7 , wherein the GROUP BY is specified by a Structured Query Language statement containing a GROUP BY clause.

9. The computer program product of claim 7 , wherein a first block of data elements contains a data element belonging to the plural-member group, and the forming of the aggregated information for the plural-member group comprises forming aggregated information for each group having a data element in the first block of data elements.

10. The computer program product of claim 7 , wherein a first block of data elements comprises a data element belonging to the plural-member group, and the computer readable program code is further configured to be executed by the processing system to perform:

maintaining a presence indicator of each of the data elements within the first block; and

removing the presence indicator for the data element having membership in the plural-member group.

11. The computer program product of claim 10 , wherein the passing of the compressed information comprises passing presence information and compressed information for each of the data elements of the first block.

12. The computer program product of claim 7 , wherein the assigning of the data elements to groups includes:

applying data of the data elements of the received one or more blocks to an associative array to determine database object elements within a same aggregation bucket from among a plurality of aggregation buckets based on one or more aggregation keys specified by a query.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 9, 2014
From: DICKIE, GARTH A.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 032633/0918 →
Continuity (1)
Related Publication 20150293967A1 · Oct 15, 2015