×

Rewrite of queries containing rank or rownumber or Min/Max aggregate functions using a materialized view

  • US 7,912,834 B2
  • Filed: 05/19/2006
  • Issued: 03/22/2011
  • Est. Priority Date: 03/26/2002
  • Status: Expired due to Term
First Claim
Patent Images

1. A method of rewriting queries, the method comprising:

  • a database computer system performing the steps of;

    receiving a query that requests N top ranking rows from groups of rows in a base table,wherein said ranking is based on a particular ranking criteria;

    query to reference a materialized view;

    wherein said criteria for rewriting the query includes that;

    a) the materialized view ranks rows based on said particular ranking criteria; and

    b) N is less than or equal to a minimum threshold number associated with the materialized view;

    wherein said materialized view is incrementally refreshed in a manner that guarantees that after incrementally refreshing, said materialized view contains a number of ranked rows in said groups of rows that is least as said minimum threshold number;

    if said received query satisfies said one or more criteria for rewriting, then rewriting said query to produce a rewritten query that references the materialized view.

View all claims
  • 0 Assignments
Timeline View
Assignment View
    ×
    ×