Projection Spill-to-Disk Buffering for Ordered Database Rows

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional spill-to-disk techniques in database management systems are inefficient in preserving data order during projection operations, leading to out-of-memory scenarios and complex handling of data storage.

Innovation Solution

A system that determines whether to store rows in a disk buffer or memory buffer based on query order and available memory, efficiently handling spill-to-disk scenarios by preserving data order when necessary and optimizing storage based on query type.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If conventional spill-to-disk techniques are used to handle out-of-memory scenarios, then data storage capacity is increased, but data order is not preserved and system complexity increases

Engineering Contradiction:
Improvedata storage capacityVSAvoidsystem complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent segments the buffer system into two distinct components: an in-memory buffer for storing rows that maintain order requirements, and a spill-to-disk buffer for rows that do not require order preservation. This segmentation allows the system to handle different data types with different storage strategies, increasing overall storage capacity while maintaining simplicity for ordered data paths.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by treating ordered rows and unordered rows differently within the same buffer system. Ordered rows are exclusively stored in the in-memory buffer to preserve their sequence, while unordered rows can be spilled to disk when memory pressure occurs. This localized differentiation resolves the contradiction by applying appropriate storage strategies to specific data subsets.

Inventive Principle:
Principle #3Local quality

2Speed

If all rows are stored in memory buffer, then data access speed is improved, but out-of-memory scenarios occur during projection operations

Engineering Contradiction:
Improvedata access speedVSAvoidmemory capacity reliability
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent introduces a spill-to-disk buffer as an intermediary storage layer between the in-memory buffer and permanent disk storage. When the in-memory buffer approaches capacity, rows are selectively spilled to this intermediary buffer on disk, preventing out-of-memory errors while maintaining fast access paths for rows that remain in memory. This intermediary layer resolves the contradiction by providing overflow capacity without compromising the speed of primary memory operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Quantity of substance

If rows are spilled to disk buffer, then memory usage is reduced, but data order may be lost

Engineering Contradiction:
Improvememory usage efficiencyVSAvoiddata order preservation
Core Design Contradiction:
Quantity of substanceVSStability of the object's composition

Solution Approach 1:

The patent applies preliminary action by determining the order requirements of rows before they are stored in the buffer system. The projection operator identifies which rows require order preservation and directs them exclusively to the in-memory buffer, while rows without order requirements are candidates for spilling to disk. This preliminary classification prevents order loss by ensuring ordered rows never enter the spill path.

Inventive Principle:
Principle #10Preliminary action

4Productivity

If in-memory buffer is expanded to handle more rows, then projection operation capacity is increased, but in-memory performance overhead increases

Engineering Contradiction:
Improveprojection operation capacityVSAvoidin-memory performance overhead
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The patent applies partial action by allocating memory buffer resources selectively based on the actual needs of projection operations. Rather than expanding the in-memory buffer to handle all possible rows (excessive action), the system expands it only to the extent necessary for rows that require order preservation, while using the spill-to-disk buffer for the remainder. This partial allocation increases projection capacity without the full overhead of expanding entire in-memory buffers.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20250238378A1Spill-to-disk in projection operations
Publication Date: 2025.07.24 SAP SE
  • US20250238378A1 patent drawing
  • US20250238378A1 patent drawing
  • US20250238378A1 patent drawing

AI summary

A system and/or method for spill-to-disk in projection operations includes receiving a query including a projection, receiving a plurality of rows in response to the query processed by a processing thread of a plurality of processing threads, determining whether the query specifies an order for the plurality of rows, determining whether a disk buffer associated with the processing thread contains a stored row in response to the query specifying the order, storing the plurality of rows in the disk buffer in response to determining the disk buffer contains the stored row, storing the plurality of rows in a memory buffer associated with the processing thread in response to determining the disk buffer does not contain the stored row and the memory buffer contains at least a threshold amount of memory to store the plurality of rows, and providing the stored plurality of rows in response to the query.