← Back to Patent Explorer
US6370524B1 Expired / Lapsed US ⏱️ 0.0 years remaining

System and method for processing queries having an inner query block containing a grouping operator

Assignee: Oracle International Corp
•
Filing: 1999-04-02
•
Granted: 2002-04-09
•
Expires: 2019-04-02
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract Queries having a outer query block enclosing an inner query block, such as a reference to a view or a subquery, with a grouping operator, such as GROUP or DISTINCT, are transformed by merging the inner query block into the outer query block. The FROM clause of the transformed query includes the tables referenced in the FROM clauses of the outer query block and the inner query block. A new GROUP BY clause is created for the outer query block that contains the rowids of tables referenced in the FROM list of the original query and the expressions in the GROUP BY clause of the inner query block. The outer query block can be split if the outer query block also contains a GROUP BY or HAVING clause.

Inventors

  • 👤 Andrew Witkowski

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-29 12:03
CPC Classifications
G; G06; G06F; G06F16/00; G06F16/20; G06F16/24; G06F16/245; G06F16/2453; G06F16/24534; G06F16/24535; Y; Y10; Y10S; Y10S707/00; Y10S707/99931; Y10S707/99932; Y10S707/99933; Y10S707/99934

Claims Analysis

Total Claims: 32
Claim 1
Independent Claim 76 words
A method of processing a query in a database system, comprising the computer-implemented steps of: receiving an original query that contains an inner query block with a grouping operator, said inner query block being embedded in an outer query block; transforming the original query into a transformed query by: removing the inner query block from the original query, and merging portions of the inner query block into the outer query block; and processing the transformed query.
Claim 2
Independent Claim 76 words
A method of processing a query in a database system, comprising the computer-implemented steps of: receiving an original query that contains an inner query block with a grouping operator, said inner query block being embedded in an outer query block; transforming the original query into a transformed query by: removing the inner query block from the original query, and merging portions of the inner query block into the outer query block; and processing the transformed query.
Claim 3
Dependent Claim 17 words
The method of claim 1 , wherein the transformed query is semantically equivalent to the original query.
Claim 4
Dependent Claim 29 words
The method of claim 1 , wherein the step of merging includes inserting table references from an inner query block FROM clause into an outer query block FROM clause.
Claim 5
Dependent Claim 17 words
The method of claim 3 , wherein the inner query block includes a reference to a view.
Claim 6
Dependent Claim 25 words
The method of claim 4 , wherein the grouping operator is an inner block GROUP BY clause, said inner block GROUP BY clause including expressions.
Claim 7
Dependent Claim 44 words
The method of claim 5 , wherein the step of merging includes the step of inserting an outer block GROUP BY clause into the outer query block, said outer block GROUP BY clause based on the expressions of the inner block GROUP BY clause.
Claim 8
Dependent Claim 27 words
The method of claim 6 , wherein the outer block GROUP BY further includes rowids of tables referenced in a FROM list of the outer query block.
Claim 9
Dependent Claim 53 words
The method of claim 6 , wherein the step of transforming further includes the steps of: inserting a HAVING clause into the outer query block, and moving a predicate of a WHERE clause of the outer query block into said HAVING clause, said predicate referencing a column in the view that is aggregated.
Claim 10
Dependent Claim 73 words
The method of claim 5 , wherein the step of transforming includes the steps of: splitting the outer query block into a first outer query block and a second outer query block, wherein the first outer query block encloses said second outer query block and includes a first outer query block GROUP BY or HAVING clause of the outer query block; and merging the inner query block into the second outer query block.
Claim 11
Dependent Claim 19 words
The method of claim 4 , wherein the grouping operator includes an inner block DISTINCT qualifier for the view.
Claim 12
Dependent Claim 91 words
The method of claim 10 , wherein the step of transforming includes the steps of: splitting the outer query block into a first outer query block and a second outer query block, wherein: the first outer query block encloses said second outer query block, the second outer query block includes a DISTINCT qualifier and contains a WHERE clause of the outer query block and; migrating the DISTINCT qualifier from the inner query block to the second outer query block; and merging the inner query block into the second outer query block.
Claim 13
Dependent Claim 28 words
The method of claim 10 , wherein the step of transforming includes converting the inner query block into an equivalent inner query block with a GROUP BY clause.
Claim 14
Dependent Claim 14 words
The method of claim 3 , wherein the inner query block includes a subquery.
Claim 15
Dependent Claim 13 words
The method of claim 13 , wherein the subquery is a non-correlated subquery.
Claim 16
Dependent Claim 34 words
The method of claim 14 , wherein the step of transforming includes the step of converting the outer query block into an equivalent outer query block referencing a view based on the non-correlated subquery.
Claim 17
Dependent Claim 90 words
A computer-readable medium bearing instructions for processing a query in a database system, said instructions, when executed, arranged for causing one or more processors to perform the steps of: receiving an original query that contains an inner query block with a grouping operator, said inner query block being embedded in an outer query block; transforming the original query into a transformed query by: removing the inner query block from the original query, and merging portions of the inner query block into the outer query block; and processing the transformed query.
Claim 18
Dependent Claim 90 words
A computer-readable medium bearing instructions for processing a query in a database system, said instructions, when executed, arranged for causing one or more processors to perform the steps of: receiving an original query that contains an inner query block with a grouping operator, said inner query block being embedded in an outer query block; transforming the original query into a transformed query by: removing the inner query block from the original query, and merging portions of the inner query block into the outer query block; and processing the transformed query.
Claim 19
Dependent Claim 18 words
The computer-readable medium of claim 16 , wherein the transformed query is semantically equivalent to the original query.
Claim 20
Dependent Claim 30 words
The computer-readable medium of claim 16 , wherein the step of merging includes inserting table references from an inner query block FROM clause into an outer query block FROM clause.
Claim 21
Dependent Claim 18 words
The computer-readable medium of claim 18 , wherein the inner query block includes a reference to a view.
Claim 22
Dependent Claim 26 words
The computer-readable medium of claim 19 , wherein the grouping operator is an inner block GROUP BY clause, said inner block GROUP BY clause including expressions.
Claim 23
Dependent Claim 45 words
The computer-readable medium of claim 20 , wherein the step of merging includes the step of inserting an outer block GROUP BY clause into the outer query block, said outer block GROUP BY clause based on the expressions of the inner block GROUP BY clause.
Claim 24
Dependent Claim 28 words
The computer-readable medium of claim 21 , wherein the outer block GROUP BY further includes rowids of tables referenced in a FROM list of the outer query block.
Claim 25
Dependent Claim 54 words
The computer-readable medium of claim 21 , wherein the step of transforming further includes the steps of: inserting a HAVING clause into the outer query block, and moving a predicate of a WHERE clause of the outer query block into said HAVING clause, said predicate referencing a column in the view that is aggregated.
Claim 26
Dependent Claim 74 words
The computer-readable medium of claim 20 , wherein the step of transforming includes the steps of: splitting the outer query block into a first outer query block and a second outer query block, wherein the first outer query block encloses said second outer query block and includes a first outer query block GROUP BY or HAVING clause of the outer query block; and merging the inner query block into the second outer query block.
Claim 27
Dependent Claim 20 words
The computer-readable medium of claim 19 , wherein the grouping operator includes an inner block DISTINCT qualifier for the view.
Claim 28
Dependent Claim 92 words
The computer-readable medium of claim 25 , wherein the step of transforming includes the steps of: splitting the outer query block into a first outer query block and a second outer query block, wherein: the first outer query block encloses said second outer query block, the second outer query block includes a DISTINCT qualifier and contains a WHERE clause of the outer query block and; migrating the DISTINCT qualifier from the inner query block to the second outer query block; and merging the inner query block into the second outer query block.
Claim 29
Dependent Claim 29 words
The computer-readable medium of claim 25 , wherein the step of transforming includes converting the inner query block into an equivalent inner query block with a GROUP BY clause.
Claim 30
Dependent Claim 15 words
The computer-readable medium of claim 18 , wherein the inner query block includes a subquery.
Claim 31
Dependent Claim 14 words
The computer-readable medium of claim 28 , wherein the subquery is a non-correlated subquery.
Claim 32
Dependent Claim 35 words
The computer-readable medium of claim 29 , wherein the step of transforming includes the step of converting the outer query block into an equivalent outer query block referencing a view based on the non-correlated subquery.

References Cited (Backward Citations)

US5367675A Cited
US5412804A Cited
US5598559A Cited
US5548758A Cited
US5978792A Cited
US5761657A Cited
US6032144A Cited
US5875447A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2005-04-08 2005-10-08 2006-04-09 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2009-04-08 2009-10-08 2010-04-09 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2013-04-08 2013-10-08 2014-04-09 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag