Query Execution Statistics Sampling and Aggregation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large organizations face challenges in efficiently tracking query execution statistics across multiple processes due to resource overhead and complexity, especially when dealing with numerous queries that execute briefly, making comprehensive monitoring resource-intensive and costly.

Innovation Solution

A system that captures query execution statistics using a sliding monitoring window and sampling intervals, identifying and logging statistics for queries executing during these intervals, and aggregating data for related queries based on similarity thresholds, reducing the need for continuous resource allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If comprehensive monitoring of all query executions is implemented, then measurement precision and reliability of execution statistics are improved, but resource consumption and system overhead increase significantly

Engineering Contradiction:
Improveexecution statistics accuracyVSAvoidresource consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent implements partial monitoring by selecting only certain query executions for detailed tracking based on predefined criteria such as query type, resource consumption thresholds, and execution frequency. This allows the system to obtain sufficient execution statistics without monitoring every single query, thereby reducing resource overhead while maintaining measurement precision for critical queries.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system employs periodic sampling of query executions at intervals rather than continuous monitoring. By periodically capturing execution statistics and using sliding time windows to aggregate data, the system achieves reliable measurement of execution patterns while significantly reducing the continuous resource consumption associated with comprehensive monitoring.

Inventive Principle:
Principle #19Periodic action

2Measurement precision

If detailed tracking of each query execution is performed, then measurement precision is improved, but device complexity and processing overhead increase

Engineering Contradiction:
Improveexecution statistics accuracyVSAvoidmonitoring system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent merges multiple query execution tracking operations into unified aggregation processes. By combining statistics from multiple queries into consolidated metrics and using shared data structures, the system reduces the complexity of managing individual query tracking while maintaining comprehensive measurement precision through the aggregated data.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The system introduces intermediary data structures such as sliding time windows and buffer mechanisms that mediate between individual query executions and the final statistics. These intermediaries simplify the complexity by providing standardized interfaces for data collection, processing, and aggregation, reducing the burden on the monitoring system while preserving measurement accuracy.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If continuous monitoring of all processes is implemented, then reliability of execution data is improved, but resource overhead and loss of time increase

Engineering Contradiction:
Improveexecution data reliabilityVSAvoidmonitoring overhead time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system applies partial monitoring by focusing resources on tracking only those query executions that meet specific criteria for reliability, such as long-running queries, resource-intensive operations, or frequently executed queries. This selective approach maintains reliable execution data for critical operations while reducing the time overhead associated with monitoring all processes continuously.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent implements self-service mechanisms where the monitoring system automatically adjusts its sampling rate and selection criteria based on observed query patterns and system conditions. This enables the system to maintain reliable execution data dynamically without requiring constant manual intervention or fixed resource allocation, thereby reducing overall monitoring overhead time while preserving data reliability.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11550789B2Capturing query execution statistics
Publication Date: 2023.01.10 ORACLE INT CORP
  • US11550789B2 patent drawing
  • US11550789B2 patent drawing
  • US11550789B2 patent drawing

AI summary

Techniques for capturing query execution statistics are disclosed. The disclosed system determines which queries are executing during a sampling interval. The system identifies related queries that share similarity criteria with the currently executing query. The system obtains query execution statistics for the query executing during the sampling interval and any related queries. The system generates or obtains statistics during a monitoring window that spans a longer period of time than a single intervening period between the current sampling interval and a prior interval. The statistics are stored in permanent storage or transmitted to a requesting computer. The system refrains from analyzing statistics for queries (and any related queries) that did not execute during a current sampling interval.