Global Secondary Index Logical Value Pre-storage for Query Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The TABLE ACCESS BY INDEX ROWID query method in distributed databases experiences low query efficiency due to the need for calculating the logical value of the distribution key of base table data, which increases processing time and resource demands.

Innovation Solution

The method involves a data node directly determining the location of base table data using the logical value of the distribution key stored in the global secondary index, omitting the calculation of the distribution key's logical value, thereby reducing processing costs and improving query efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the TABLE ACCESS BY INDEX ROWID query method is used to query data in a distributed database, then data can be queried using a global secondary index, but query efficiency is low due to the need for calculating the logical value of the distribution key

Engineering Contradiction:
Improvequery efficiencyVSAvoidprocessing time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-storing the logical value of the distribution key in the global secondary index data structure. This allows the data node to directly retrieve the logical value during query processing without performing calculation, thereby reducing processing time and improving query efficiency. The logical value is prepared in advance as part of the index data, eliminating the need for real-time computation.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the distribution key's logical value is calculated during query processing, then the correct data node can be identified, but processing costs and resource demands increase

Engineering Contradiction:
Improvedata node identification accuracyVSAvoidprocessing complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies copying by storing a copy of the logical value of the distribution key within the global secondary index data structure itself. This copied logical value is then directly used during query processing to identify the correct data node, eliminating the need for real-time calculation and reducing processing complexity while maintaining identification accuracy.

Inventive Principle:
Principle #26Copying

3Productivity

If GSI data includes the distribution key value, then data can be located, but storage space requirements increase

Engineering Contradiction:
Improvedata location capabilityVSAvoidstorage space
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent applies extraction by separating the distribution key value from the GSI data structure and replacing it with only the necessary logical value component. This extracted and simplified approach retains the essential data location capability while reducing storage space requirements, as only the logical value is stored rather than the complete distribution key information.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentEP4672021A1Data query method and related device
Publication Date: 2025.12.31 HUAWEI TECH CO LTD
  • EP4672021A1 patent drawingFigure 1~2
  • EP4672021A1 patent drawingFigure 3
  • EP4672021A1 patent drawingFigure 4

AI summary

This application provides a data query method and a related apparatus, to resolve a problem that efficiency of a TABLE ACCESS BY INDEX ROWID query based on a global secondary index is low in conventional technologies. In a technical solution provided in this application, GSI data stored on a first data node includes a logical value of a distribution key of base table data. When performing a TABLE ACCESS BY INDEX ROWID query operation, the first data node may directly determine a second data node based on the logical value of the distribution key of the base table data. The second data node is a data node, in a distributed system, that stores base table data meeting a query condition. In the method, a process of calculating the logical value of the distribution key of the base table data in the conventional technologies can be omitted, which improves query efficiency.