Database Index Hit Frequency Calculation for Query Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database administrators often introduce indexes that do not effectively improve query performance, and may even degrade it due to a lack of knowledge about subsequent database operations.

Innovation Solution

A method and system for database indexing that calculates the hit frequency of each index by dividing the number of hits by the length of the index, allowing for the optimization of index inclusion based on usage statistics of SQL statements, thereby improving query performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If database administrators manually designate index includes to improve query performance, then index structure can be optimized, but the indexes may not achieve the intended performance improvement or may even degrade query performance due to lack of knowledge about actual database operations

Engineering Contradiction:
Improvequery performanceVSAvoidindex effectiveness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements feedback by monitoring actual SQL statement executions and index usage patterns, then using this information to dynamically adjust index includes. The database automatically collects statistics on which indexes are actually used and adjusts the index structure based on real usage data, ensuring that index optimization decisions are based on actual performance needs rather than administrator guesses.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The database system performs self-optimization by automatically analyzing its own query patterns and index usage without requiring external administrator intervention. The system monitors its own operations, identifies which indexes are most effective, and automatically adjusts index includes based on this self-collected data, making the optimization process autonomous and adaptive to changing workloads.

Inventive Principle:
Principle #25Self-service

2Speed

If more index includes are added to improve query performance, then query speed may improve, but index maintenance overhead and storage requirements increase

Engineering Contradiction:
Improvequery speedVSAvoidindex structure complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The system applies partial action by selectively including only those indexes that provide actual performance benefit based on monitored usage patterns. Rather than maintaining all possible indexes or using a fixed comprehensive index structure, the system dynamically determines the optimal subset of index includes based on actual query workloads, maintaining only what is necessary for current performance needs.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The index structure becomes dynamic rather than static, with index includes being adjusted based on changing query patterns and usage statistics. The system continuously monitors performance and adapts the index structure over time, allowing the most frequently used and most effective indexes to be included while less useful indexes are excluded, making the index configuration flexible and adaptive to workload changes.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10146819B2Database indexes
Publication Date: 2018.12.04 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10146819B2 patent drawing
  • US10146819B2 patent drawing
  • US10146819B2 patent drawing

AI summary

A method and system for database indexing, wherein a database index comprises at least one index include. The method and system includes obtaining the number of executions of each of a plurality of Structured Query Language (SQL) statements within a certain time period, respectively, wherein the plurality of SQL statements use the database index. For each of the at least one index include, calculating a number of hits of the index include according to the number of executions of each of the plurality of SQL statements. Further, obtaining a length of the index include, and calculating a hit frequency of the index include by using the number of hits and the length of the index include. The hit frequency equals the number of hits divided by the length.