Processing window partitioning and ordering for on-line analytical processing (OLAP) functions
First Claim
Patent Images
1. A computer-implemented method, comprising:
- in response to receiving a first query,obtaining a set of prior compares, wherein each prior compare of the set of prior compares has attributes;
in response to determining that there are attributes shared by multiple prior compares in the set of prior compares, finding an intersection of attributes;
selecting a prior compare from the set of prior compares that has not been examined;
in response to determining that the intersection of attributes is part of the selected prior compare,removing the selected prior compare from the set of prior compares; and
inserting a new prior compare into the set of prior compares with the attributes of the intersection of attributes; and
in response to determining that the selected prior compare is any one of a new intersection and part of the set of prior compares initially obtained, adding the selected prior compare to prior compare building blocks; and
in response to receiving a second query, re-using the prior compare building blocks.
1 Assignment
0 Petitions
Accused Products
Abstract
Provided are techniques for processing window partitioning and ordering for OLAP functions. A prior compare operation is performed by: receiving an input vector for each of one or more attributes of input data that represent one of a partition-by column and an order-by column in a database query; generating a per-attribute comparison vector for each input vector; and producing a single output vector using each per-attribute comparison vector, wherein each value of the single output vector is a Boolean attribute whose value for a given tuple is true if a current value and a most recent prior value of any of the one or more attributes are different.
-
Citations
15 Claims
-
1. A computer-implemented method, comprising:
in response to receiving a first query, obtaining a set of prior compares, wherein each prior compare of the set of prior compares has attributes; in response to determining that there are attributes shared by multiple prior compares in the set of prior compares, finding an intersection of attributes; selecting a prior compare from the set of prior compares that has not been examined; in response to determining that the intersection of attributes is part of the selected prior compare, removing the selected prior compare from the set of prior compares; and inserting a new prior compare into the set of prior compares with the attributes of the intersection of attributes; and in response to determining that the selected prior compare is any one of a new intersection and part of the set of prior compares initially obtained, adding the selected prior compare to prior compare building blocks; and in response to receiving a second query, re-using the prior compare building blocks. - View Dependent Claims (2, 3, 4, 5)
-
6. A computer program product, the computer program product comprising a computer readable storage medium having program code embodied therewith, the program code executable by at least one processor to perform:
-
in response to receiving a first query, obtaining a set of prior compares, wherein each prior compare of the set of prior compares has attributes; in response to determining that there are attributes shared by multiple prior compares in the set of prior compares, finding an intersection of attributes; selecting a prior compare from the set of prior compares that has not been examined; in response to determining that the intersection of attributes is part of the selected prior compare, removing the selected prior compare from the set of prior compares; and inserting a new prior compare into the set of prior compares with the attributes of the intersection of attributes; and in response to determining that the selected prior compare is any one of a new intersection and part of the set of prior compares initially obtained, adding the selected prior compare to prior compare building blocks; and in response to receiving a second query, re-using the prior compare building blocks. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A computer system, comprising:
-
one or more processors, one or more computer-readable memories and one or more computer-readable, tangible storage devices; and program instructions, stored on at least one of the one or more computer-readable, tangible storage devices for execution by at least one of the one or more processors via at least one of the one or more memories, to perform operations comprising; in response to receiving a first query, obtaining a set of prior compares, wherein each prior compare of the set of prior compares has attributes; in response to determining that there are attributes shared by multiple prior compares in the set of prior compares, finding an intersection of attributes; selecting a prior compare from the set of prior compares that has not been examined; in response to determining that the intersection of attributes is part of the selected prior compare, removing the selected prior compare from the set of prior compares; and inserting a new prior compare into the set of prior compares with the attributes of the intersection of attributes; and in response to determining that the selected prior compare is any one of a new intersection and part of the set of prior compares initially obtained, adding the selected prior compare to prior compare building blocks; and in response to receiving a second query, re-using the prior compare building blocks. - View Dependent Claims (12, 13, 14, 15)
-
Specification