Database Storage Architecture for LOB
2010-07-11 16:16:41| 分类:
dbms
| 标签:
|举报
|字号大中小 订阅
Actual data is stored in a location pointer (Locator) which is essentially a unique id and allows LOBs to be manipulated without extensive copying.
LOBs are typically stored separately from the data records in whose fields they appear.
Take DB2 Everyplace as an example
Itis stored in separate LOB table space in an auxiliary table
LOB Locator (DB2)
Host variable represents a single LOB value in DB server
Easily manipulate LOB w/o having to store LOB value to client
Requirements for managing large objects
Object creation/deletion
lower cost(time) of creating, allocation (deallocation)
Content operation
whole data/a certain bytes of data operation: seek, read, replace, insert, delete, append
Good random/sequential access performance
Storage utilization
Minimize fragmentation
LOB field must be recoverable
Algorithm
Block-based
store object in the scattered blocks of disk (slow for sequential read)
Segment-based
store object in physically adjacent blocks
ESM(fixed-size segments)/Starburst(segments of fixed pattern of growth)/EOS(variable-size segments)
1).ESM (EXODUS Storage Manager)
Support large objects of unlimited size
All byte operations can be applied
Data segments are indexed by a B-tree-like structure(Indexed on byte position within the object)
2).Starburst
Extent based allocation
When size not known
Allocated for storage double in size until max segment size (Predetermined pattern)
When size known
Max size is used to hold
Last segment trimmed
Efficiency
Efficient for read, append, byte range replace
Not Efficient for insertion(deletion) of bytes in middle of object
Change the size of the long field (entire long field must be copied to new segments)
suitable for read only object(ex. video, audio)
3).EOS
Object stored in variable-size segments (physically continuous disk pages)
All of its pages must get filled up except last one
Positional tree structure
When byte range delete/insert performed, segments may be broken up
Disk allocation policy
binary buddy system:
manage large fixed-size disk sections of physically adjacent pages
segments managed as if their size is some integral power of 2
References:
1). Michael Shapiro, Managing Databases with Binary Large Objects, Proc. Of 16th IEEE Mass Storage System Symposium, 1999
2). The Performance of Three Database Storage Structures for Managing Large Objects, SIGMOD 1992
评论这张
转发至微博
转发至微博
评论