Asynchronous Index Loading for Database Startup Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The rebuilding of indexes during system startup in in-memory databases leads to significant latency, slowing down the time between database initialization and query processing, as it fully utilizes processing power and depends on the size and number of indexes.

Innovation Solution

Implementing an asynchronous index loading system with a pre-loader thread that rebuilds indexes in the background parallel to query processing and an asynchronous index loader that rebuilds necessary indexes on demand, allowing queries to be processed immediately after initialization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If indexes are rebuilt during system startup, then query efficiency is improved, but startup latency increases

Engineering Contradiction:
Improvequery efficiencyVSAvoidstartup latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by starting the index rebuilding process during system initialization, but completes it asynchronously in the background. The pre-loader thread initiates index reconstruction before the database becomes fully operational, allowing the system to declare readiness while the indexes are still being built. This resolves the contradiction by ensuring query efficiency is improved (indexes are rebuilt) while minimizing startup latency (system becomes operational before indexes are complete).

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The index rebuilding process is segmented into background tasks that run independently from the main query processing path. The pre-loader thread separates index construction from the critical query execution path, allowing queries to be processed using available indexes or alternative methods while the full index set is being constructed in the background. This segmentation resolves the contradiction by decoupling index rebuilding from system startup completion.

Inventive Principle:
Principle #1Segmentation

2Productivity

If all indexes are rebuilt before query processing, then query performance is optimized, but system responsiveness deteriorates

Engineering Contradiction:
Improvequery performanceVSAvoidsystem responsiveness
Core Design Contradiction:
ProductivityVSSpeed

Solution Approach 1:

The system dynamically adjusts its operation mode based on index availability. When full indexes are not yet rebuilt, the system operates in a degraded mode accepting queries with reduced performance. As indexes are progressively rebuilt by the pre-loader thread, the system transitions to using optimized query paths. This dynamic adaptation resolves the contradiction by allowing the system to be responsive immediately while gradually achieving optimized query performance as indexes become available.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The pre-loader thread ensures continuous useful action by constantly working on index reconstruction in the background without interrupting query processing. Rather than pausing query operations to complete index builds, the system maintains continuous query responsiveness while the index rebuilding proceeds uninterrupted in parallel. This continuity resolves the contradiction by maintaining system responsiveness while steadily improving query performance through ongoing index construction.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS10740311B2Asynchronous index loading for database computing system startup latency managment
Publication Date: 2020.08.11 SAP SE
  • US10740311B2 patent drawing
  • US10740311B2 patent drawing
  • US10740311B2 patent drawing

AI summary

A system, computer-implemented method, and computer-program product embodiments for rebuilding database indexes is disclosed. A pre-loader thread rebuilds a plurality of indexes in the background once a database is initialized. Simultaneously, a query processor receives queries from a user/client of a database. If an index that is required by the query processor has not yet been rebuilt by the pre-loader, a request to rebuild the index is sent to an asynchronous index loader. The asynchronous index loader places the request in a queue, processes the queue based on available system resources, and then rebuilds the requested indexes. Once the necessary indexes have been rebuilt, a wake-up signal is sent to the query processor which then proceeds to execute the query from a user/client.