Register Login

SAP HANA LOBs Interview Question and Answer

Updated May 18, 2018

HANA LOBs Question and Answer

1. What do you mean by LOBs in SAP HANA environments?

To store a large amount of data such as text documents and images LOBs (large objects) are columns that are used.

2. Where information related to LOBs can be found?

Please check the online documentation for more information about LOBs.

3. What indicates problems in the LOB area?

For one of the following individual checks SQL: "HANA_Configuration_MiniChecks" returns a potentially critical issue (C = 'X'):

Check ID

Details

450

Tables with memory LOBs > 2 GB

2140

Tables with LOBs located on different node

Read more about SAP HANA Certification Cost and Course Duration in India

4. What types of LOB related data exist?

The following types of LOB related data exist:

Data type

Content

BLOB

Binary data, e.g. pictures

CLOB

ASCII text data

NCLOB

Unicode text data

TEXT

Text data with additional text search features

BINTEXT

Text and binary data with additional text search features

5. What maximum data size can you store in a LOB field?

A LOB field can hold a maximum of 2 GB.

6. If LOB data is loaded into memory or not in what you can you control?

Columns were generally loaded into memory up to SAP HANA SPS 06 LOB when they were accessed. It is possible to configure LOBs as so-called hybrid LOBs starting with SAP HANA SPS 07. When their size doesn't exceed a configurable threshold (default: 1000 byte) they are only loaded into memory.

7. Is it possible to compress or deduplicate LOB data?

Like normal columns memory LOBs are compressed.

It is not possible to compress and deduplicate LOB data. The SAP HANA memory consumption does not have any impact of the limitation as all data is kept on disk. You have to compress the data from application perspective if you want to reduce the disk space allocation. In SAP ABAP environments (e.g. ABAP sources and loads, cluster and pool tables) this is already done for many LOB columns since a long time.

8. Is there anything to collect LOB specific garbage?

For hybrid LOBs Garbage collection is required. The LobGarbageCollector (column store) / GarbageLobFileHandler (row store) threads performs this.

9. Should VARBINARY be considered as a LOB type?

Large binary data (up to 5000 byte) can be hold by VARBINARY, however, it cannot be considered as LOB data types. As a consequence the column is loaded into memory when it is accessed and the hybrid LOB feature can't be used.

With LRAW data type SAP ABAP table columns are mapped to the following SAP HANA data types:

LRAW length limit

SAP HANA Data Type

<= 5000

VARBINARY

> 5000

BLOB / CLOB

Many potentially large tables as a consequence with large LRAW columns (<= 5000 byte) are loaded into memory (e.g. BALDAT, PCL2, SOC3, SWNCMONI, SWWNCTP0) completely. From VARBINARY to BLOB / CLOB on SAP HANA level in rare, critical cases it is possible to adjust the column data type. The SAP DDIC will recognize this as an inconsistency of the database object ("Fields: Inconsistent with the runtime object") although the SAP application will still work without problems. If you intend to switch a column from VARBINARY to BLOB / CLOB open a SAP incident on component HAN-DB in order to get assistance and avoid this option whenever possible.

10. Does column store only support hybrid LOBs?

No, only for row store and column store tables hybrid LOBs can be used.

11. How can the existing LOBs be checked?

If hybrid or memory LOBs are used for the tables and how much space disk LOBs allocate SQL: "HANA_Tables_LargestTables" displays - among others -.

To display tables with disk LOBs SQL: "HANA_LOBs_LOBFiles" can be used.

12. What disadvantages are found in case of too many hybrid LOBs?

A lot of values are stored on disk when configuring hybrid LOBs. This can have some disadvantages:

Risk

Details

SAP HANA startup times increases

The startup of SAP HANA can be slowed down by the high number of disk LOBs during virtual file startup as LOB statistics are created at this stage.

Memory requirements increase

If many disk LOBs exist the following heap allocators can be large

  • Pool/PersistenceManager/PersistentSpace(0)/DefaultLPA/Page
  • Pool/PersistenceManager/PersistentSpace/DefaultLPA/Page
  • Pool/PersistenceManager/ContainerFileIDMapping
  • Pool/PersistenceManager/LOBContainerDirectory

13. In scale-out systems where disk LOBs are stored?

On the SAP HANA node Disk LOBs are stored which executes the related change operation. The change operations are executed on the node of the table and so the LOB data is stored locally if statement routing is used in the standard way. Otherwise it is possible to store disk LOBs on a node other than the table node. There is no need to adjust it as it is a normal situation. You can use ALTER TABLE MOVE PHYSICAL in case you want to move the LOB data and the table data to the same node.


×