Query Rewrite with Remote Materialized Views

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed database systems, queries cannot be efficiently rewritten to reference materialized views that contain remote database objects, limiting the use of query rewrite and database performance.

Innovation Solution

The solution involves rewriting queries to dynamically track the staleness state of materialized views and utilize inline views to transform queries to reference either local or remote materialized views, optimizing network communication and performance by determining the freshness of data and calculating network costs for join back operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If queries are rewritten to reference materialized views containing remote database objects, then database performance is improved, but the complexity of query processing increases

Engineering Contradiction:
Improvedatabase performanceVSAvoidquery processing complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary mechanism that tracks staleness state of materialized views and determines whether to rewrite queries. This mediator component simplifies the complexity by providing a clear decision framework: if the materialized view is fresh, rewrite the query; if stale, do not rewrite. This intermediary layer manages the complexity of distributed query processing while maintaining performance benefits.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of energy

If query rewrite is limited to local materialized views only, then query processing remains simple, but network communication costs increase

Engineering Contradiction:
Improvenetwork communication costsVSAvoidquery rewrite mechanism complexity
Core Design Contradiction:
Loss of energyVSDevice complexity

Solution Approach 1:

The patent changes the parameter of materialized view accessibility from local-only to both local and remote. By allowing queries to reference materialized views stored in remote databases, the system reduces network communication costs by utilizing pre-computed results across the distributed system. This parameter change enables query rewrite to extend beyond local boundaries while managing the increased complexity through systematic staleness tracking.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If materialized views are used to access remote database objects, then data accessibility is improved, but data freshness cannot be guaranteed

Engineering Contradiction:
Improvedata accessibilityVSAvoiddata freshness
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent implements a feedback mechanism through staleness state tracking of materialized views. The system continuously monitors whether materialized views are fresh or stale and uses this feedback information to determine whether to rewrite queries. This feedback loop ensures that only fresh materialized views are used for query rewriting, guaranteeing data freshness while maintaining the versatility of accessing remote database objects through materialized views.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS7899839B2Query rewrite with a remote object
Publication Date: 2011.03.01 ORACLE INT CORP
  • US7899839B2 patent drawing
  • US7899839B2 patent drawing
  • US7899839B2 patent drawing

AI summary

A query statement, issued to a local database server, is re-written. The query references at least one of a first or a second object. The first object is remote with respect to the local database server, for accessing a first materialized view that is local or remote with respect to the local database server. The second object is local with respect to the local database server, to access a second materialized view that is remote with respect to the local database server. Rewriting the query can include dynamically tracking a staleness state associated with one or more of the materialized views.