Logarithmic Access Counters for Automated Database Index Advising
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing automated physical database tuning methods lack precise, compact, and fast collection of workload execution statistics, leading to inaccurate and inefficient database configuration.
Innovation Solution
Implementing logarithmic counters for index advisors, data compression advisors, buffer pool size advisors, and table partitioning advisors to track and provide precise workload execution statistics with low memory and runtime overhead, using lazy counters and interval counting to reduce memory consumption and improve accuracy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional access counters are used to track workload execution statistics, then measurement precision is improved, but memory consumption increases significantly
Solution Approach 1:
The patent transforms the counting mechanism from linear to logarithmic scale. Instead of counting exact access frequencies, the system uses logarithmic counters that record the order of magnitude of access frequencies. This parameter transformation maintains sufficient precision for database tuning decisions while dramatically reducing the memory footprint, as logarithmic values require fewer bits to represent the same range of frequencies.
Solution Approach 2:
The patent implements different counting strategies for different data structures and access patterns. Logarithmic counters are used specifically for index advisor access counters where precise frequency ordering is needed but exact counts are unnecessary. This localized application of logarithmic counting optimizes memory usage for the specific purpose of index recommendation without compromising the quality of workload statistics for that particular function.
2Measurement precision
If detailed workload execution statistics are collected, then measurement precision is improved, but runtime overhead increases
Solution Approach 1:
The system changes the parameter being measured from exact access counts to logarithmic frequency buckets. During query execution, instead of incrementing precise counters for each access, the system determines which logarithmic bucket the access frequency falls into and increments that counter. This approach provides sufficient precision for determining relative access frequencies while minimizing the computational overhead during query execution.
Solution Approach 2:
The patent employs lazy counter creation where logarithmic counters are only created when actually needed during query execution, rather than pre-allocating all possible counters. This on-demand creation reduces the initialization overhead and memory allocation time, making the statistics collection process more efficient while maintaining measurement precision when counters are actively used.
3Adaptability or versatility
If comprehensive access counters are implemented for all advisors, then adaptability is improved, but device complexity increases
Solution Approach 1:
The patent creates a universal logarithmic counter framework that serves multiple advisor tools (index advisor, data compression advisor, buffer pool size advisor, table partitioning advisor). The same logarithmic counter infrastructure and measurement mechanisms are reused across all advisor types, reducing overall system complexity despite the comprehensive coverage of multiple advisors. Each advisor leverages the same core counting technology adapted to its specific needs.
Solution Approach 2:
The system segments the counter management into distinct components: logarithmic counter data structures, lazy creation mechanisms, and advisor-specific access patterns. This segmentation allows each component to be optimized independently while maintaining overall system coherence. The modular structure reduces complexity by clearly defining interfaces and responsibilities between different parts of the counter management system.
Data Source
AI summary
The present disclosure involves systems, software, and computer implemented methods for improved design and implementation of data access metrics for automated physical database design. An example method includes identifying a database workload for which index advisor access counters are to be tracked. Each SQL statement in the database workload is executed. For each SQL statement, attribute sets are determined for which a selection predicate filters a result for an SQL statement. An output cardinality of each selection predicate is determined. A logarithmic counter for an attribute set corresponding to the selection predicate is determined based on the output cardinality of the selection predicate. The determined logarithmic counter is incremented. Respective values for logarithmic counters of the determined attributes are provided to an index advisor. The index advisor determines attribute sets for which to propose an index based on the logarithmic counters of the respective attribute sets.


