US7895186B2

Method and mechanism of materialized view mix incremental refresh

Summary by NHIP

Two-phase materialized view refresh

The method updates a materialized view using two consecutive phases to handle both partition and non-partition change track tables. The first phase applies row changes via a materialized view log or direct load log, while the second phase applies partition changes without using a log for those specific base tables.

Claim Score by NHIP

Read claim 5, the broadest

Abstract

A method and system for updating both partition change track tables and non-partition track tables in a materialized view. A log-based incremental refresh is performed on the materialized view and a partition change tracking based refresh is performed on the materialized view. The dependency of the materialized view log for the partition change track base table is removed.

US7895186B2, drawing sheet 1
Sheet 1 of 5

Term

Projected expiry 25 October 2027.

  1. Priority
  2. Filed
  3. Granted
  4. Today
  5. Projected expiry

20 claims: 7 independent, 13 dependent

  1. 1
    A method executed in a computer system comprising:updating changes from both partition change track tables and non-partition track tables in a single materialized view refresh process with two consecutive phases wherein: a first phase performs a log-based incremental update on the materialized view;and a second phase performs a partition change tracking based update on the materialized view, where the materialized view has both partition change track base tables and non-partition change track base tables, where a materialized view log is present for the non-partition change track base tables, and where a materialized view log is not present for the partition change track base tables.
  2. 5
    Broadest claimClaim Score 56, average(NHIP)A method of two-phase incremental maintenance of a materialized view in a computer system comprising:in a first phase, applying row changes from non-partition change tracking base tables to the materialized view;and in a second phase, applying partition changes from the partition change tracking base tables to the materialized view, where the materialized view has both partition change track base tables and non-partition change track base tables, where a materialized view log is present for the non-partition change track base tables, and where a materialized view log is not present for the partition change track base tables.
  3. 9
    A method of two-phase incremental refresh of a materialized view in a computer system comprising:applying changes of non-partition change track base tables using materialized view logs to the materialized view in a first phase;and applying changes of partition change track base tables using partition change information to the materialized view in a second phase, where the materialized view has both partition change track base tables and non-partition change track base tables, where a materialized view log is present for the non-partition change track base tables, and where a materialized view log is not present for the partition change track base tables.
  4. 13
    A method of two-phase fast incremental refresh of a materialized view executed in a computer system comprising:creating a materialized view from one or more base tables including at least one partitioned partition change tracking base table and at least one non-partitioned base table;storing partition keys of the at least one partitioned partition change tracking base table on a defining query of the materialized view;creating materialized view logs for all non-partitioned base tables;applying any row changes from the at least one non-partition change tracking base table to the materialized view in a first phase;and applying partition changes from the at least one partition change tracking base table to the materialized view in a second phase.
  5. 18
    A non-transitory computer-readable medium storing computer-executable instructions that when executed by a computer cause the computer to perform a method, the method comprising:updating changes from both partition change track tables and non-partition track tables in a single materialized view refresh process with two consecutive phases wherein: a first phase performs a log-based incremental update on the materialized view;and a second phase performs a partition change tracking based update on the materialized view, where the materialized view has both partition change track base tables and non-partition change track base tables, where a materialized view log is present for the non-partition change track base tables, and where a materialized view log is not present for the partition change track base tables.
  6. 19
    A non-transitory computer-readable medium storing computer-executable instructions that when executed by a computer cause the computer to perform a method, the method comprising:in a first phase, applying row changes from non-partition change tracking base tables to the materialized view;and in a second phase, applying partition changes from the partition change tracking base tables to the materialized view, where the materialized view has both partition change track base tables and non-partition change track base tables, where a materialized view log is present for the non-partition change track base tables, and where a materialized view log is not present for the partition change track base tables.
  7. 20
    A non-transitory computer-readable medium storing computer-executable instructions that when executed by a computer cause the computer to perform a method, the method comprising:applying changes of non-partition change track base tables using materialized view logs to the materialized view in a first phase;and applying changes of partition change track base tables using partition change information to the materialized view in a second phase, where the materialized view has both partition change track base tables and non-partition change track base tables, where a materialized view log is present for the non-partition change track base tables, and where a materialized view log is not present for the partition change track base tables.