Consultor Eletrônico



Kbase P132849: 4GL/ABL: How and where is the the BLOB or CLOB field data stored?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   04/02/2010
Status: Verified

GOAL:

4GL/ABL: How and where is the the BLOB or CLOB field data stored?

GOAL:

Is the data of the BLOB and CLOB fields of TEMP-TABLEs and database user tables stored in the record itself?

GOAL:

Does the length of data in a BLOB or CLOB field count towards towards the 32K record size limit of an OpenEdge TEMP-TABLE or database table record?

GOAL:

What are the BLOB and CLOB fields? And what are their data size limits?

GOAL:

What are the benefits of storing the BLOB or CLOB data outside of the table record?

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x

FIX:

The data of a TEMP-TABLE LOB and CLOB fields is stored in the same way as that of a user database table LOB and CLOB fields. That is, the data is not stored in the record itself but in an external location with a pointer in the record to that external location. Hence, the length or size of the LOB and CLOB fields do not count towards the 32K record size limit.
Binary large objects (BLOBs) and character large objects (CLOBs) fields can be up to 1 gigabyte long.
While conceptually they are like other fields in a database record, they are stored separately and the record contains a "lob locator" that points to the data. This has the following benefits:
1. The 32 k record size limit is not exceeded, but lob values can be much larger than 32K
2. When you read a record from the database, the lob values are not retrieved with the record. Instead they are retrieved on demand when you use the lob data. This is good for performance because you don't pay for fetching the lob data unless you actually want it.
3. If the record is updated but the lob data is not, then the transaction log (bi and ai logs) overhead is not increased since the lob data does not have to be recorded. This is good both for performance and for transaction log space usage.
Please note that when the lob data is created, updated, or deleted, there is overhead associated with it. Also there is overhead if you make a copy of the record and include the lob data in the copy.