Hash-Based Database Index Checks for Faster Consistency Verification
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database consistency checks in large databases are time- and resource-inefficient, leading to unavailability of database tables and potential data loss, particularly due to inefficient index and data page linking checks.
Innovation Solution
Implementing a hash table-based index consistency check during database scans to verify index and data page relationships, using a multi-level hash table to store and compare hash values of index and data rows, with a retry phase to resolve inconsistencies.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional database consistency checks are performed to verify index and data page linking, then database reliability is improved, but execution time and resource consumption increase significantly
Solution Approach 1:
The patent creates a hash table copy of index row values during the consistency check process. Instead of performing complex comparisons between index pages and data pages, the system generates hash values from index rows and stores them in a hash table, then quickly verifies data page consistency by comparing hash values. This copying approach significantly reduces execution time while maintaining reliability.
Solution Approach 2:
The patent replaces traditional mechanical comparison methods (direct row-by-row comparison between index and data pages) with a hash-based computational approach. By substituting the mechanical system of direct comparison with a hash value-based system, the patent achieves faster verification with reduced resource consumption while maintaining the same consistency checking goal.
2Measurement precision
If comprehensive index consistency checks are performed across all database pages, then detection precision of inconsistencies is improved, but computational resources and time consumption increase
Solution Approach 1:
The patent uses hash tables to create a compressed representation of index data, storing only hash values rather than complete index rows. This copying method maintains the ability to detect inconsistencies accurately while significantly reducing memory usage and computational overhead during the verification process.
Solution Approach 2:
The patent transforms the consistency checking process by changing the parameter representation from storing complete index row data to storing hash values. This parameter transformation reduces the amount of data that needs to be processed and stored, thereby reducing computational resource consumption while maintaining detection precision through hash value comparisons.
3Reliability
If traditional consistency check methods are used to verify index and data page relationships, then index consistency is ensured, but false alerts increase and actual inconsistencies may be missed
Solution Approach 1:
The patent creates a hash table copy of index row values and uses this copy for verification against data pages. This copying approach reduces false alerts by providing a reliable reference that can be efficiently compared against actual data page content, improving the accuracy of inconsistency detection while maintaining index consistency assurance.
Data Source
AI summary
Methods, systems, and computer-readable storage media for reading a page stored in a database system, each page storing rows of data, for a first index row of a first page, determining that the first index row is absent from being recorded in a hash table, and in response, storing a first record of the first index row in the hash table, the first record including a first hash value representative of the first index row, for a first data row of a second page, providing a second index row based on one or more values of one or more fields of the first data row, and determining that the second index row is recorded in the hash table as the first index row in the first record, and in response, removing the first record from the hash table, and outputting index consistency results based on the hash table.


