Like any other file systems that manage variable-sized data, SecureFiles is subject to fragmentation during operation. There are two major issues identified for SecureFiles.
Fragmentation of SecureFiles LOB Segment
Fragmentation happens when the segment largely consists of small chunks (e.g. single-block chunk in the worst case) due to chunk splitting caused by DMLs. Fragmentation leads to performance degradation and inefficiency in space usage.
Overgrowth of SecureFiles LOB segment
A SecureFiles LOB Segment can grow unnecessarily large due to concurrent DMLs, high retention setting and space preallocation (manual or automatic intended to mitigate the overhead of on-demand segment growth).
In earlier releases of Oracle Database, the shrink DDL (i.e. ALTER TABLE … SHRINK SPACE) did not support SecureFiles LOB segments. To release free space in SecureFiles LOB segments to the tablespace, an organization needed to either recreate the segment or run ‘ALTER TABLE … MOVE LOB’, which may take a long time when the segment is large.
Similar to the shrink feature for heap tables and BasicFiles, Oracle Database 21c SecureFiles shrink enables concurrent queries, and DMLs, and blocks concurrent DDLs. SecureFiles shrink gradually releases extents during the active period and can be terminated manually at any time.
SecureFiles shrink also supports existing advanced SecureFiles LOB capabilities including compression, encryption and deduplication.