Thomas Carlton
Thomas Carlton

Reputation: 5958

Oracle Blob Storage?

I'm running Oracle 11g.

I have a table that contains 3 Blob columns (A, B, C). According to database design, some columns may be empty for some rows. Example :

It may be quite random.

I would like to know please whether an entirely full row will require the same amount of storage space as an incomplete row. For example Row 4 vs Row 1

Thanks. Cheers,

Upvotes: 1

Views: 1142

Answers (1)

pmdba
pmdba

Reputation: 7033

Unless they are under 4000 bytes, BLOB values are generally not stored in the table row; only pointers to the LOB storage are contained in the row and the actual BLOB data is placed in out-of-line, dedicated storage. Pointers exist whether or not the LOB has any content (i.e. for empty or for data), so from that perspective the rows will all be the same length (short), regardless of how big the BLOBs are. There is also a distinction between an empty BLOB and a null BLOB. For more details, see here: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adlob/LOB-storage-with-applications.html#GUID-B82B3C24-1FAF-4661-96A0-28241FD2A052

Upvotes: 1

Related Questions