Automatic Statistical View Generation for Database Optimizer Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database systems face challenges in accurately estimating the cardinality of join operations, leading to optimizer errors, and manually declaring and maintaining statistical views is impractical due to high costs and overhead.

Innovation Solution

A method to automatically generate statistical views based on collected optimization and execution data, focusing on sub-expressions with errors or difficulties, and reducing redundancy by eliminating duplicates and generalizing similar views, while balancing costs with error minimization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If statistical views are manually declared to improve optimizer performance, then optimizer accuracy improves, but maintenance cost and storage overhead increase significantly

Engineering Contradiction:
Improveoptimizer accuracyVSAvoidmaintenance cost
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system automatically generates and maintains statistical views without manual intervention. The database system self-manages the creation, update, and deletion of statistical views based on workload analysis, eliminating the need for database administrators to manually declare and maintain these views while still achieving accurate optimization

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system dynamically adjusts the number and type of statistical views based on workload characteristics and performance requirements. By changing parameters such as workload complexity, query patterns, and performance thresholds, the system optimizes the balance between optimizer accuracy and maintenance overhead

Inventive Principle:
Principle #35Parameter changes

2Reliability

If all possible statistical views are generated to minimize optimizer errors, then optimization accuracy improves, but storage requirements and processing overhead become unmanageable

Engineering Contradiction:
Improveoptimization accuracyVSAvoidstorage overhead
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The system extracts and generates only the necessary statistical views required for accurate optimization, rather than generating all possible statistical views. By identifying and focusing on critical sub-expressions that impact optimization accuracy, the system reduces storage overhead while maintaining reliability

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system generates statistical views selectively based on workload requirements rather than comprehensively for all possible operations. This partial action approach ensures sufficient optimization accuracy for actual workload needs without the excessive storage and processing overhead of generating all possible statistical views

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If statistical views are maintained for all operations to ensure accurate cost estimation, then optimizer reliability improves, but the time to search and compile execution plans increases

Engineering Contradiction:
Improvecost estimation accuracyVSAvoidplan compilation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system extracts and maintains only the statistical views necessary for accurate cost estimation of actual workload operations. By eliminating unnecessary statistical views, the system reduces the time required for the optimizer to search and evaluate plans while maintaining reliability for critical operations

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS7725461B2Management of statistical views in a database system
Publication Date: 2010.05.25 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US7725461B2 patent drawing
  • US7725461B2 patent drawing
  • US7725461B2 patent drawing

AI summary

A method, computer program product, and system for managing statistical views in a database system are provided. The method, computer program product, and system provide for collecting data relating to optimization and execution of a workload in the database system and automatically generating a set of one or more statistical views based on the collected optimization and execution data.