Second Level Row Cache for Database Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Mobile device databases face performance issues due to the extra computation time required for unpacking rows each time they are accessed, which is exacerbated by the need to adapt to increased memory availability and stricter memory requirements over time.

Innovation Solution

Implementing a second-level row cache that stores unpacked rows, utilizing a specialized memory manager for efficient memory usage and a replacement algorithm to manage cached rows, allowing for shared memory between the page cache and row cache, and dynamically allocating memory to prioritize performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If rows are unpacked (de-serialized) into memory for access, then row data becomes accessible for database operations, but extra computation time is added to each access operation

Engineering Contradiction:
Improverow accessibilityVSAvoidunpacking computation time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-unpacking row data from the database file and storing it in a second-level row cache before actual database operations are needed. This allows the unpacking computation to be performed in advance, so that when rows are accessed during normal database operations, they are already in unpacked format and ready for immediate use, eliminating the computation time penalty during critical operations.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If a large page cache is used to utilize increased memory availability, then database performance improves through more cache hits, but memory resources are consumed that could be used for other purposes

Engineering Contradiction:
Improvedatabase query performanceVSAvoidmemory resource allocation
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent applies segmentation by dividing the caching system into two distinct levels: a first-level page cache that stores packed database pages, and a second-level row cache that stores unpacked row data. This segmentation allows each cache level to serve specific purposes with optimized memory usage - the page cache handles bulk page storage while the row cache handles frequent row access operations, thereby improving overall memory resource efficiency and database performance.

Inventive Principle:
Principle #1Segmentation

3Quantity of substance

If rows are stored in packed format in the database file, then storage efficiency is improved, but unpacking is required for access which adds computation time

Engineering Contradiction:
Improvestorage efficiencyVSAvoidunpacking computation time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent introduces an intermediary component - the second-level row cache - that sits between the packed database file and the unpacked row data needed for operations. This intermediary pre-performs the unpacking transformation and holds ready-to-use unpacked rows, thereby decoupling the storage efficiency benefits of packed format from the computation time penalty of unpacking, as the unpacking is done in advance by the intermediary rather than at the moment of access.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10558571B2Second level database file cache for row instantiation
Publication Date: 2020.02.11 SYBASE INC
  • US10558571B2 patent drawing
  • US10558571B2 patent drawing
  • US10558571B2 patent drawing

AI summary

In an example embodiment, one or more pages from a database are stored in a page cache stored in a shared memory, the one or more pages stored in a packed format. One or more rows from the database are stored in a row cache stored in the shared memory, the one or more rows stored in an unpacked format. A request for a row of the database is received. Then, the row cache is searched for the row. In response to a determination that the row cannot be found in the row cache, the page cache is searched for the row. Finally, the row is returned.