Re: By default, LOB store in line or out of line?

  • From: Leyi Kamus Zhang <kamusis@xxxxxxxxx>
  • To: louis <ylouis83@xxxxxxxxx>
  • Date: Sun, 22 Apr 2012 17:21:17 +0800

Hi Louis
Yes, you're correct, I used dbms_lob.getlenghth to get the CLOB column
length, and my database character set is ZHS16GBK, so the length 2080 I
mentioned in original mail should require 4160 bytes, it will store out of
line.

It seemed the 1st paragraph in the doc I mentioned is wrong? By default,
LOB will store in line, except it's length large than 4000 bytes or
explicitly using DISABLE STORAGE IN ROW.

I'll check the Tanel's presentation. Thanks for your info.

--
Kamus <kamusis@xxxxxxxxx>

Visit my blog for more : http://www.dbform.com
Join ACOUG: http://www.acoug.org


2012/4/22 louis <ylouis83@xxxxxxxxx>

> Data in CLOB columns is stored in a format that is compatible with UCS-2
> when the database character set is multibyte, such as UTF8 or AL32UTF8.
> This means that the storage space required for an English document doubles
> when the data is converted. Storage for an Asian language document in a
> CLOB column requires less storage space than the same document in a LONG 
> column
> using UTF8, typically around 30% less, depending on the contents of the
> document.
>
> å?¨ 2012å¹´4æ??21æ?¥ ä¸?å??11:34ï¼?Leyi Kamus Zhang 
> <kamusis@xxxxxxxxx>å??é??ï¼?
>
>>  Hi Lists
>> According to the Doc as below:
>> *Oracle® Database Application Developer's Guide - Large Objects
>> 10g Release 2 (10.2)*
>>
>> Part Number B14249-01
>>
>> In Chapter 4 there are 2 graphï¼?
>> 1. LOB values are stored out-of-line when any of the following situations
>> apply:
>>
>> *By default. That is, if you do not specify a LOB parameter for the LOB
>> storage clause when you create the table.*
>>
>>
>> 2. ENABLE or DISABLE STORAGE IN ROW Clause
>>
>> You use the ENABLE | DISABLE STORAGE IN ROW clause to indicate whether the
>> LOB should be stored inline (in the row) or out-of-line.
>>
>> Note:
>> You may not alter this specification once you have made it: if you ENABLE
>> STORAGE IN ROW, then you cannot alter it to DISABLE STORAGE IN ROW and
>> vice
>> versa.
>> *The default is ENABLE STORAGE IN ROW.*
>>
>>
>> Document error? Which one is the TRUTH? or I misunderstanding something?
>>
>> Based on our test, even every LOB has only 2080bytes(less than 4000bytes),
>> LOB is stored OUT of line, but dba_lobs.in_row=YES.
>>
>> --
>> Kamus <kamusis@xxxxxxxxx>
>>
>> Visit my blog for more : http://www.dbform.com
>> Join ACOUG: http://www.acoug.org
>>
>> --
>> //www.freelists.org/webpage/oracle-l
>>
>>
>>
>
>
> --
> Phone: +86 13918046970
> Email & Gtalk:  ylouis83@xxxxxxxxx
> Personal Blog: http://www.vmcd.org
>
>

--
//www.freelists.org/webpage/oracle-l


Other related posts: