Large objects (LOBs) store large unstructured data such as texts, images, videos, and spatial data. LOBs include binary large objects (BLOBs) and character large objects (CLOBs). This topic describes the LOB data types supported by OceanBase Database V4.3.3 and the corresponding limitations.
LOB data types
The following table describes the LOB data types supported by OceanBase Database V4.3.3.
| Type | Fixed/Variable length | Maximum length of definition | Character set |
|---|---|---|---|
| BLOB | Variable | 536,870,910 bytes | BINARY |
| CLOB | Variable | 536,870,910 bytes | Same as the character set of the tenant |
Note
Unlike Oracle Database that references data by using the LOB locator, OceanBase Database stores the LOB locator in the same structure as the data.
Decreasing the threshold of a LOB column is an offline DDL operation.
Limitations for using LOB columns
LOB columns are subject to the following limitations:
Do not specify a
LOBcolumn as a primary key column.The following data structures are only temporary instances and cannot be stored in database tables:
Any
VARRAYobject of aLOBtypeAny
VARRAYobject that contains aLOBtype, such as an object type with theLOBattributeAny
ANYDATAobject of aLOBtypeAny
ANYDATAobject that contains aLOBtype
Do not specify a
LOBcolumn in theORDER BYorGROUP BYclause in a query.Do not specify a
LOBcolumn in a join or aSELECT...DISTINCTorSELECT...UNIQUEstatement.When you create a
AFTER UPDATEDML trigger, do not specify aLOBcolumn in anUPDATE OFclause.Do not specify a
LOBcolumn as a part of an index key.