In DB2, we store unstructured data in LOBs. There are three types:
- BLOB – Binary data
- CLOB- Character data
- DBCLOB- Double byte character data.
Performance-wise, we need to take some special care for LOBs. When creating a tablespace, we need to give LOG NO. So that logging will not occur and your performance will be improved.
This is a query to create a tablespace:
CREATE LOB TABLESPACE SRIPHOTO
IN DSN111A
USING STOGROUP DSN111B
PRIQTY 3200
SECQTY 1600
LOCKSIZE LOB
BUFFERPOOL BP16K0
ABPCACHE SYSTEM
LOG NO
CLOSE NO;
