Rewriting a query in terms of a summary based on one-to-one and one-to-many losslessness of joins
AssigneeOracle Corporation
InventorsRandall Bello, James Finnerty, Mohamed Ziauddin, Andrew Witkowski
Life of this patent
Estimating the term…
Loading patent…
AssigneeOracle Corporation
InventorsRandall Bello, James Finnerty, Mohamed Ziauddin, Andrew Witkowski
Estimating the term…
A method and system are provided for processing queries. According to one aspect of the invention, a query that does not reference a particular materialized view is rewritten to reference the materialized view. In particular, upon receiving the query, it is determined whether the particular materialized view satisfies each condition in a set of conditions, where the set of conditions at least includes a condition that the materialized view reflects all rows that exist in a common section. The common section is a section of the query that is common to both the materialized view and the query. If the materialized view satisfies each condition in the set of conditions, then the query is rewritten to produce a rewritten query that references the materialized view. The materialized view may be a summary table that includes a summary column. The summary column contains values generated by aggregating values contained in rows produced by a one-to-many lossless join. The one-to-many lossless join is not in the common section. The query includes a cumulative aggregate function. Under these conditions, the method includes generating results of the cumulative aggregate function in the query by dividing values from the summary column by scaling factors.
A method for processing queries, the method comprising the steps of:
A computer-readable medium carrying one or more sequences of instructions for processing queries, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
Dependencies are inferred from the claim text.