Database Query Optimization via Selectivity-Based Caching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

As database queries become increasingly complex, existing databases face challenges in optimizing execution costs, particularly due to complex sub-queries that involve overlapping portions of database tables, leading to inefficient processing times.

Innovation Solution

The method involves classifying source nodes in a hierarchical tree representation of database queries as highly selective or not highly selective based on access criteria, and modifying the query structure by replacing source nodes with sub-trees that optimize access control and caching strategies, depending on selectivity status, to improve query execution performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If complex sub-queries are used to optimize database queries, then query optimization capability is improved, but processing time increases

Engineering Contradiction:
Improvequery optimization capabilityVSAvoidprocessing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent segments complex sub-queries into smaller, reusable query components stored in a query plan cache. By breaking down complex queries into manageable segments that can be independently cached and reused, the system maintains optimization capability while reducing overall processing time through avoidance of redundant computation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary analysis of query components and caches optimized query plans before actual query execution. By pre-computing and storing optimized execution plans for common query patterns, the database can rapidly retrieve and apply these plans during actual query processing, eliminating the need to re-optimize identical or similar queries each time they are executed.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If query optimization is performed for all sub-queries, then query execution efficiency is improved, but computational resource consumption increases

Engineering Contradiction:
Improvequery execution efficiencyVSAvoidcomputational resource consumption
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The patent applies different optimization strategies to different query components based on their characteristics. Highly selective source nodes receive different treatment compared to non-highly selective nodes, with optimization applied locally where most beneficial rather than uniformly across all query components, thus improving execution efficiency while conserving computational resources.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system dynamically adjusts optimization parameters such as caching thresholds and selectivity criteria based on query characteristics and system state. By changing these parameters adaptively, the database can optimize query execution efficiency while controlling computational resource consumption according to current workload conditions.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If source nodes are replaced with filtered selections and intermediate tables, then access control is optimized, but query structure complexity increases

Engineering Contradiction:
Improveaccess controlVSAvoidquery structure
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces intermediate tables as mediators between the original query structure and the optimized execution plan. These intermediate tables serve as placeholders that simplify the immediate query structure while enabling sophisticated access control and caching operations to be performed during execution, thus improving reliability without permanently increasing structural complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9104725B2Automatic tuning of database queries
Publication Date: 2015.08.11 BUSINESS OBJECTS SOFTWARE
  • US9104725B2 patent drawing
  • US9104725B2 patent drawing
  • US9104725B2 patent drawing

AI summary

A database query is modified to improve performance by identifying portions of database tables that are likely to be reused and modifying the database query accordingly. According to certain embodiments, the degree of selectivity with which a table is accessed is used to identify tables that are likely to be reused in subsequent database operations.