Dynamic Match Rule Generation for Materialized View Query Rewriting

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The increasing complexity and cost of managing and storing large amounts of data in database systems are exacerbated by high computational and storage access workloads, necessitating techniques to reduce complexity and improve data processing efficiency.

Innovation Solution

The dynamic generation of match rules for rewriting queries to utilize materialized views, allowing for the automatic identification and application of existing materialized views to reduce computational load and enhance query performance, even for new or unseen queries, by dynamically tailoring rules to match query patterns and updating capabilities as new materialized views are created.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If materialized views are used to reduce computational load, then query performance is improved, but the complexity of managing and storing data increases

Engineering Contradiction:
Improvequery performanceVSAvoiddata management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system automatically generates match rules and rewrites queries to use materialized views without requiring manual configuration or client application specification. The database system self-manages the complexity of matching queries to materialized views through automated rule generation and evaluation, resolving the contradiction by making the system self-sufficient in handling the management complexity.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

Match rules are generated in advance when materialized views are created, storing the mapping logic between queries and materialized views. This preliminary action allows the system to quickly determine whether a query can be served by an existing materialized view without performing complex analysis at query execution time, thus improving query performance while managing complexity through pre-computation.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If manual specification of materialized views is required, then query performance can be optimized, but ease of operation decreases

Engineering Contradiction:
Improvequery performanceVSAvoidclient application simplicity
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The database system automatically generates match rules and performs query rewriting without requiring client applications to manually specify materialized views. The system self-manages the entire process of matching queries to materialized views through automated rule generation and evaluation, eliminating the need for manual configuration while maintaining query performance optimization.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

Match rules act as an intermediary between client queries and materialized views. Instead of requiring direct manual specification by clients, the match rules automatically bridge the gap by evaluating whether queries can be served by existing materialized views and performing the necessary rewriting, thus maintaining ease of operation while achieving performance optimization.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If dynamic rule generation is implemented, then adaptability to new materialized views is improved, but device complexity increases

Engineering Contradiction:
Improveadaptability to new materialized viewsVSAvoidrule generation system complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system dynamically generates match rules when materialized views are created, allowing automatic adaptation to new materialized views without manual intervention. The match rule generation process is triggered automatically upon materialized view creation, ensuring the system remains adaptable to changing data structures while managing complexity through event-driven automation rather than static configuration.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system establishes a feedback loop where the creation of new materialized views automatically triggers the generation of corresponding match rules. This feedback mechanism ensures that the system continuously adapts to new materialized views by using the creation event as input to generate the necessary matching logic, maintaining adaptability while managing complexity through automated feedback-driven updates.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11550787B1Dynamic generation of match rules for rewriting queries to use materialized views
Publication Date: 2023.01.10 AMAZON TECH INC
  • US11550787B1 patent drawing
  • US11550787B1 patent drawing
  • US11550787B1 patent drawing

AI summary

Match rules for rewriting queries to use materialized views may be dynamically generated by a database system. A database system may generate rules that indicate whether a given query can use a materialized view and how to rewrite the given query to use the materialized view. A query may be received and the rules may be applied to the query to determine that the query can use the materialized view and to rewrite the query to use the materialized view. The rewritten query can then be executed.