Database Bulk Insert Mode Switching for Massive Data Loading

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database systems face inefficiencies in large-scale data loading due to serial inserts and index updates in non-BULK insert mode, leading to wasted time and resources, even when using multiple threads.

Innovation Solution

Converting serial inserts to BULK insert mode, where rows are accumulated into row buffers the size of data pages and written to disk in parallel, allowing for simultaneous index updates, thereby reducing the frequency of resource allocation and index updates.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If serial inserts are used to load data row-by-row, then data integrity and index updates are maintained, but loading efficiency and productivity are severely reduced

Engineering Contradiction:
Improvedata loading speedVSAvoidtime for index updates
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments the data loading process into distinct phases: a warm-up phase that loads initial rows with full index updates to establish baseline performance, and a bulk phase that loads subsequent rows using batched operations with reduced index update frequency. This segmentation allows the system to balance between maintaining data integrity and improving loading efficiency for large datasets.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements periodic index updates during bulk loading operations, where indexes are updated at regular intervals rather than after every row insertion. This periodic action reduces the overhead of continuous index maintenance while still ensuring data integrity, thereby improving overall productivity during massive data loading scenarios.

Inventive Principle:
Principle #19Periodic action

2Productivity

If multiple threads are used for parallel data loading, then throughput increases, but resource allocation overhead and complexity increase

Engineering Contradiction:
ImprovethroughputVSAvoidthread management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent merges multiple thread operations into coordinated bulk loading phases, where multiple threads work in parallel during the warm-up and bulk phases but are synchronized at key checkpoints. This merging approach maintains high throughput while reducing the complexity of thread management by establishing clear phase boundaries and coordination points.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces a coordinator mechanism that acts as an intermediary between multiple loading threads and the index management system. This intermediary consolidates index update requests from multiple threads and processes them in a coordinated manner, reducing thread management complexity while maintaining parallel throughput.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If indexes are updated after every row insertion, then data integrity is maintained, but resource usage and operation frequency increase

Engineering Contradiction:
Improvedata integrityVSAvoidresource usage for index updates
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent implements periodic index updates during bulk loading operations, where indexes are updated at regular intervals rather than after every row insertion. This periodic action reduces the overhead of continuous index maintenance while still ensuring data integrity, thereby improving overall productivity during massive data loading scenarios.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The patent performs preliminary index updates during the warm-up phase before bulk loading begins, establishing the index structure in advance. This preliminary action reduces the frequency of index updates required during subsequent bulk loading operations, thereby reducing resource usage while maintaining data integrity.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9665612B2Run-time decision of bulk insert for massive data loading
Publication Date: 2017.05.30 SYBASE INC
  • US9665612B2 patent drawing
  • US9665612B2 patent drawing
  • US9665612B2 patent drawing

AI summary

A method can include initiating execution of a database command, the database command associated with a base table with at least one row to copy to a target table, the database command associated with a non-bulk insert mode; making a run-time decision on whether to automatically convert the insert mode from the non-bulk insert mode to a BULK insert mode based on the number of row buffers filled with rows from the base table during execution of the database command; and inserting at least one row into the target table using an insert mode based on the run-time decision.