cancel
Showing results for 
Search instead for 
Did you mean: 

Long object to LOB object

Former Member
0 Kudos

Hi All,

We have a table with 'LONG VARCHAR FOR BIT DATA' where we exported and recreated the table using R3load then the same field got changed to this attribute 'BLOB(32768) INLINE LENGTH 4096 LOGGED COMPACT'.

We had seen a drastic reduction in the space occupied, it went down by almost 10 times post change to BLOB.

Can someone please throw some light on this behaviour please.

Below is the db2 version : "DB2 v10.5.0.3"

Why such a drastic reduction in space and also is this how it should behave?

Accepted Solutions (1)

Accepted Solutions (1)

hugo_amo
Employee
Employee
0 Kudos

Hi,

IBM does not recommend the use of LONG VARCHAR data type anymore, although it is still supported. BLOB is the one to be used instead.

Hope some other can give you more information about the space question.

Regards,

Hugo

Former Member
0 Kudos

Basically the long data occupied before the import and after the import using R3load drastically reduced.

Former Member
0 Kudos

Hi Hugo,

So we should ideally go for an export/import of the whole system inorder to create the tables with LOB option.

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos


It is also possible to use DB6CONV to convert LONG to LOB . Regards Frank

Former Member
0 Kudos

Hi Frank,

DB6CONV would internally still use admin table move right?

Then its very slow. Exporting and importing is much faster i feel.

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

True, but only a few tables in the system habe LONG VARCHAR columns and exporting/importing the system moves much more data. In addition to this DB6CONV causes no downtime.

Regards

                 Frank

Former Member
0 Kudos


This was very helpful and I will learn further according to similar cases. Thank you.

Answers (1)

Answers (1)

johannes_heinrich
Active Participant
0 Kudos

Hello,

see the document


...

"To maximize the benefit of the LOB inlining feature, with the new DBSL patch all LONG data types will be replaced with LOB data types for new tables. "

...

The paper also contains some space measurements. In your case, the old table was probably also fragemented.

Regards,

Johannes