IP Library Granted Patent US 9,311,355
Granted Patent B2
US 9,311,355 · App. 13/770,189 · Granted Apr 12, 2016

Autonomic refresh of a materialized query table in a computer database

Inventor: John M. Santosuosso (Rochester, MN)
Assignee: International Business Machines Corporation
G06F17/30457
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,311,355
App. No.
13/770,189
Granted
Apr 12, 2016
Kind
B2
Abstract

A method autonomically refreshes a materialized query table (MQT) in a computer database to improve database performance and utility. In preferred embodiments, the query optimizer autonomically initiates a refresh of MQT depending on an estimated time for the query to access the base tables. In other preferred embodiments, the query optimizer estimates the time for the query to access the base tables and compares it to the estimated time to refresh the MQT to determine whether to refresh the MQT and run the query over the MQT rather than the base tables.

Claims (23)

1. An apparatus comprising:

at least one processor;

a memory coupled to the at least one processor;

a database residing in the memory having data;

a query optimizer residing in the memory that parses a query to identify a base table of the database with a materialized query table (MQT) in deferred maintenance; and

wherein the query optimizer autonomically determines whether to update the MQT or execute the query over the base table by estimating a time to execute the query over the base table corresponding to the MQT, estimating a time to update the MQT, comparing the estimated time to update the MQT and the estimated time to execute the query over the base table; and

wherein the query optimizer updates the MQT where the estimated time to update the MQT is less than the time to execute the query over the base table; and executes the query over the updated MQT.

2. The apparatus of claim 1 wherein the query optimizer considers a time of trigger events to estimate the time to refresh the MQT.

3. The apparatus of claim 1 wherein the query optimizer considers results stored in a staging table to estimate the time to refresh the MQT.

4. A program product comprising:

a query optimizer that parses a query to identify a base table with a materialized query table (MQT), wherein the query optimizer autonomically determines whether to update the MQT or execute the query over the base table by estimating a time to execute the query over the base table corresponding to the MQT, estimating a time to update the MQT, comparing the estimated time to update the MQT and the estimated time to execute the query over the base table, wherein the query optimizer updates the MQT where the estimated time to update the MQT is less than the time to execute the query; and executes the query over the updated MQT; and

non-transitory computer-recordable media bearing the query optimizer.

5. The program product of claim 4 wherein the query optimizer considers a time of trigger events to estimate the time to refresh the MQT.

6. The program product of claim 4 wherein the query optimizer considers results stored in a staging table to estimate the time to refresh the MQT.

7. An apparatus comprising:

at least one processor;

a memory coupled to the at least one processor;

a database residing in the memory having data;

a query optimizer residing in the memory that parses a query to identify a base table of the database with a materialized query table (MQT), meaning the refresh of the MQT has been deferred;

wherein the query optimizer autonomically determines whether to update the MQT or execute the query over the base table by estimating a time to execute the query over the base table corresponding to the MQT, estimating a time to update the MQT, comparing the estimated time to update the MQT and the estimated time to execute the query over the base table;

wherein the query optimizer updates the MQT since the estimated time to update the MQT is less than the time to execute the query over the base table; and executes the query over the updated MQT;

wherein the query optimizer considers a time of trigger events to estimate the time to refresh the MQT; and

wherein the query optimizer considers results stored in a staging table to estimate the time to refresh the MQT.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 24, 2018
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: WORKDAY, INC.
Reel/Frame 044721/0844 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 22, 2013
From: SANTOSUOSSO, JOHN M.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 029857/0718 →
Continuity (2)
Continuation 11197607 · Aug 4, 2005
Related Publication 20130159284A1 · Jun 20, 2013