Gradual LOB Structure Shrinking Without Blocking Database Access
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for managing large object (LOB) structures in databases result in significant downtime and storage requirements due to the need to copy data to a new structure during defragmentation, which is time-consuming and inefficient, especially for large datasets like petabytes of data.
Innovation Solution
An iterative best-effort approach is employed to shrink LOB structures by identifying and deallocating portions of the structure without blocking access to other parts, allowing for gradual defragmentation in chunks, thus reducing fragmentation over time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Stability of the object's composition
If data is copied from fragmented LOB structure to newly allocated LOB structure for defragmentation, then defragmentation is achieved, but storage space doubles and operation time increases prohibitively
Solution Approach 1:
The patent divides the LOB structure into multiple extents (segments) that can be processed independently. Instead of copying the entire LOB structure at once, the system processes one extent at a time, allowing defragmentation to occur in manageable portions without requiring double the storage space.
Solution Approach 2:
The patent implements a dynamic approach where extents are processed sequentially with the ability to pause and resume operations. The system can dynamically allocate and deallocate extents during the defragmentation process, allowing the LOB structure to remain accessible while being reorganized.
2Stability of the object's composition
If data is copied from fragmented LOB structure to newly allocated LOB structure for defragmentation, then defragmentation is achieved, but operation time increases prohibitively
Solution Approach 1:
By segmenting the LOB structure into extents, the patent enables parallel processing and resumable operations. Each extent can be processed independently and quickly, and if an operation is interrupted, only that specific extent needs to be redone rather than the entire structure.
Solution Approach 2:
The patent maintains continuous access to the LOB structure during defragmentation by using multiple extents simultaneously. While one extent is being processed, other extents remain accessible, ensuring continuous useful action without complete downtime.
3Stability of the object's composition
If entire LOB structure is allocated for defragmentation, then defragmentation can proceed, but write operations are blocked
Solution Approach 1:
The patent segments the LOB structure into multiple extents that can be processed independently. During defragmentation, only the current extent being processed is locked, while other extents remain accessible for read and write operations, maintaining system availability.
Solution Approach 2:
The patent uses extent-level locking as an intermediary mechanism that allows fine-grained control over access during defragmentation. This mediator enables concurrent access to different parts of the LOB structure, balancing defragmentation needs with operational availability.
4Stability of the object's composition
If full LOB structure is copied for defragmentation, then complete defragmentation is achieved, but storage capacity requirements double
Solution Approach 1:
The patent divides the LOB structure into extents that are processed sequentially. At any given time, only the current extent being defragmentated requires additional buffer space, not the entire structure. This reduces peak storage requirements from 2x the LOB size to a minimal buffer amount.
Solution Approach 2:
The patent immediately deallocates processed extents after successful defragmentation, recovering storage space for use by other operations. This prevents accumulation of unused space and allows the system to operate with minimal additional storage capacity.
Data Source
AI summary
A computer program product, system, and computer implemented method for automatic, repetitive, and gradual shrink of very large database object structures. The approach disclosed herein generally comprises an iterative best efforts approach to automatically shrink a large database object structure(s). The process may comprise identifying a large object (LOB) structure shrink event and LOB structure or LOB structure segment to be shrunk. And executing a shrink operation on the LOB structure or LOB structure segment without blocking access to other extents in the LOB structure or LOB segment structure. This process allows an extent to be shrunk and deallocated. As a result, the process can operate to continually clean a LOB structure or LOB structure segment to decrease fragmentation within the extents of the LOB structure or LOB segment structure.


