A large object (LOB) is a data type that can store large amounts of unstructured data, such as text, images, video, and spatial data. LOB data types include BLOB and CLOB. This topic provides an overview of the LOB data types supported in the current version of OceanBase Database.
Overview of LOB data types
The following table describes the LOB data types supported in the current version of OceanBase Database.
| Type | Length | Maximum length | Character set |
|---|---|---|---|
| BLOB | Variable | 536870910 bytes | BINARY |
| CLOB | Variable | 536870910 bytes | The character set of the tenant |
Note
Unlike in Oracle databases, where LOB locators reference data, in OceanBase Database, LOB locators are stored in the same structure as the data itself.
Changing the threshold of LOB data from a larger value to a smaller one requires triggering an offline DDL operation.
Limitations on LOB columns
LOB columns have the following limitations:
You cannot specify a
LOBcolumn as a primary key column.The following data structures can only be used as temporary instances and cannot be stored in database tables:
Any
VARRAYof theLOBtype.Any
VARRAYthat contains aLOBtype, such as an object type with theLOBattribute.Any
ANYDATAof theLOBtype.Any
ANYDATAthat contains aLOBtype.
You cannot specify a
LOBcolumn in theORDER BY,GROUP BY, or aggregate function clauses of a query.You cannot specify a
LOBcolumn inSELECT...DISTINCTorSELECT...UNIQUEstatements or in joins.When creating an
AFTER UPDATEDML trigger, you cannot specify aLOBcolumn in theUPDATE OFclause.You cannot specify a
LOBcolumn as part of an index key.
