Fast refresh of snapshots containing subqueries
AssigneeOracle Corporation
InventorsAlan Downing, Harry Sun, Ashish Gupta
Life of this patent
Estimating the term…
Abstract
A method and apparatus for fast refreshing a subquery snapshot creates the snapshot based on a first table and a second table according to a snapshot definition query, which contains one or more subqueries. Information about modifications to the first and second tables is stored in first and second log, respectively. When a refresh operation is initiated, the snapshot is refreshed by reconciling differences between the snapshot, the first table and second table according to the snapshot definition query, the first log, the second log, the first table, and the second table.
Claims33
A method of refreshing a snapshot, comprising the computer-implemented steps of:
- creating said snapshot based on a snapshot definition query on a plurality of master tables, wherein said snapshot definition query contains one or more subqueries;
- detecting a modification to a row of one of said plurality of master tables;
- in response to detecting said modification, recording the value of a primary key stored in said row in a master log;
- and
- in response to initiation of a refresh operation, reconciling differences between said snapshot and said master tables based on said master log.
A method of refreshing a snapshot, comprising the computer-implemented steps of:
- creating said snapshot based on a plurality of master tables, comprising an outer table and one or more inner tables, and a snapshot definition query containing at least one subquery on an inner table of said plurality of master tables, wherein each master table has a respective primary key;
- detecting a modification to a row of one of said plurality of master tables;
- in response to detecting said modification, recording the value of the primary key stored in said row in a master log;
- and
- in response to initiation of a refresh operation, reconciling differences between said snapshot and said plurality of master tables based on said master log.
A method of refreshing a snapshot, comprising the computer-implemented steps of:
- creating said snapshot based on a first table having a first primary key, a second table having a second primary key, and a snapshot definition query on said first table, wherein said snapshot definition query contains a subquery on said second table, which has an equijoin predicate on a unique key of said second table and on an equijoin column of said first table;
- detecting a first modification to a first row of said first table;
- in response to detecting said first modification, recording the value of said first primary key stored in said first row of said first table and a first value indicative of said first modification in a first log;
- detecting a second modification to a second row of said second table;
- in response to detecting said second modification, recording the value of said second primary key stored in said second row of said second table, and a second value indicative of said second modification in a second log;
- and
- in response to initiation of a refresh operation, reconciling differences between said snapshot, said first table, and said second table based on said snapshot definition query, said first log, said second log, said first table, said second table, and said snapshot.
A method of refreshing a snapshot, comprising the computer- implemented steps of:
- receiving a refresh command indicating an initiation of a refresh operation;
- detecting a modification to a row of one of said plurality of master tables;
- in response to detecting said modification, recording the value of a primary key stored in said row in a master log;
- and
- in response to receiving the refresh command, reconciling differences between a plurality of master tables and a snapshot created based on a snapshot definition query on the master tables and based on said master log, wherein said snapshot definition query contains one or more subqueries.
A method of refreshing a body of data constructed of a plurality of master tables, including an outer table and at least one inner table based on a definition query having at least one subquery on the at least one inner table, comprising the steps of:
- detecting a modification to a row of one of said plurality of master tables;
- in response to detecting said modification, recording the value of a primary key stored in said row in a master log;
- and
- in response to initiation of a refresh operation, reconciling differences between said body of data and said plurality of master tables based on said master log.
A method of refreshing a body of data constructed of data from a plurality of master tables including a first table having a first primary key and a second table having a second primary key, comprising the steps of:
- creating said body of data based on the first table, a second table, and a definition query on said first table, wherein said definition query contains a subquery on said second table, which has an equijoin predicate on a unique key of said second table and on an equijoin column of said first table;
- detecting a first modification to a first row of said first table;
- in response to detecting said first modification, recording the value of said first primary key stored in said first row of said first table and a first value indicative of said first modification in a first log;
- detecting a second modification to a second row of said second table;
- in response to detecting said second modification, recording the value of said second primary key stored in said second row of said second table, and a second value indicative of said second modification in a second log;
- and
- reconciling differences between said body of data, said first table, and said second table based on said definition query, said first log, said second log, said first table, said second table, and said body of data.
Dependencies are inferred from the claim text.