Large objects (LOBs) store large unstructured data such as literals, 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 and the corresponding limitations.
LOB data types
The following table describes the LOB data types supported by OceanBase Database.
| Type | Length | Maximum length of definition (character) | Character sets |
|---|---|---|---|
| BLOB | Variable | 48 MB | BINARY |
| CLOB | Variable | 48 MB | Consistent with 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.
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:
VARRAYof anyLOBtypeAny
VARRAYthat contains aLOBtype, such as an object type with theLOBattributeANYDATAof anyLOBtypeAny
ANYDATAthat contains aLOBtype
Do not specify a
LOBcolumn in theORDER BYclause orGROUP 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 aUPDATEclause.Do not specify a
LOBcolumn as a part of an index key.