Database Memory Allocation for Large Data Retrieval

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database systems face inefficiencies in storage allocation when retrieving data of indeterminate size, particularly for LOB and XML data types, due to the need for maximum storage allocation and the use of LOB locators, which can lead to performance issues and resource consumption.

Innovation Solution

The introduction of extensions to the SQL FETCH statement, including a 'CONTINUE' operation, allows for dynamic allocation of memory based on actual data length, enabling retrieval of data in smaller increments and avoiding the use of LOB locators, with the database maintaining the position of truncated data for subsequent fetches.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If maximum storage size is allocated for LOB columns to ensure sufficient space for retrieval, then data retrieval capability is improved, but memory consumption increases significantly

Engineering Contradiction:
Improvedata retrieval capabilityVSAvoidmemory consumption
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent segments the data retrieval process into multiple FETCH operations. Instead of allocating maximum storage upfront, the system performs initial FETCH with a reasonable buffer size, checks for truncation indicators, and subsequently performs additional FETCH operations to retrieve the remaining data in segments, thereby avoiding excessive memory allocation while ensuring complete data retrieval

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic buffer allocation by allowing the application to start with an initial buffer size and then allocate additional buffer space based on actual data needs. The system dynamically adjusts memory usage by performing subsequent FETCH operations only when truncation is detected, making the memory consumption adaptive rather than static

Inventive Principle:
Principle #15Dynamics

2Quantity of substance

If LOB locators are used to manage large object retrieval, then storage allocation efficiency is improved, but system complexity and resource management overhead increase

Engineering Contradiction:
Improvestorage allocation efficiencyVSAvoidsystem complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent extracts the complexity of LOB locator management from the system by eliminating the need for locators entirely. Instead of using locator objects to manage large object retrieval, the system uses direct FETCH operations with truncation indicators, thereby maintaining storage allocation efficiency while removing the associated complexity and resource management overhead

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent enables the FETCH operation itself to provide the necessary information about data size and truncation status through indicators returned with each FETCH. This self-service mechanism eliminates the need for separate locator objects to manage retrieval, as the FETCH operation directly provides all necessary control information

Inventive Principle:
Principle #25Self-service

3Quantity of substance

If multiple FETCH operations are performed to retrieve truncated data, then memory allocation efficiency is improved, but the number of database trips increases

Engineering Contradiction:
Improvememory allocation efficiencyVSAvoiddatabase trip frequency
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent performs preliminary action by including truncation indicators with the initial FETCH operation. This allows the application to determine in advance whether additional FETCH operations are needed, avoiding unnecessary database trips. The truncation indicator provides upfront information that guides subsequent retrieval actions

Inventive Principle:
Principle #10Preliminary action

4Ease of manufacture

If a fixed buffer size is used for FETCH operations, then allocation simplicity is improved, but adaptability to varying data lengths deteriorates

Engineering Contradiction:
Improveallocation simplicityVSAvoidadaptability to data length
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

Solution Approach 1:

The patent implements dynamic buffer allocation by allowing the application to start with an initial buffer size and then allocate additional buffer space based on actual data needs. The system dynamically adjusts memory usage by performing subsequent FETCH operations only when truncation is detected, making the memory consumption adaptive rather than static

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS8086817B2Method and system for efficient retrieval of data of large or unknown length by a native application program
Publication Date: 2011.12.27 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US8086817B2 patent drawing
  • US8086817B2 patent drawing
  • US8086817B2 patent drawing

AI summary

A method and system for efficient allocation of memory in database retrieval employs a technique which allocates a memory portion of a first size which may or may not be smaller than a data item to be retrieved from the database (such as a column which may be of indeterminate length). In that circumstance, a first FETCH, for example, an SQL FETCH, is followed by a new syntactical instruction, a FETCH CONTINUE, until all of the data item is retrieved. The FETCH CONTINUE may involve allocating memory portions of similar or different sizes to accommodate additional fetched portions, and may involve varying numbers of fetches.