RE: different avg_row_len in 9i and 10g+ at table with LOB

From: D'Hooge Freek <>
Date: Sun, 18 Jan 2009 23:33:09 +0100
Message-ID: <>


I don't know if it is relevant here, but be aware that dbms_lob.getlength will return the number of characters in a clob, not the number of bytes. Also the characterset used to store text in a clob is depending on your db characterset, the db version and your platform. For instance: on a 10g AL32UTF8 database on linux, the text in a clob is stored using the AL16UTF16 characterset, which is a fixed 2 byte width. This would mean you need to multiply the result of dbms_getlength by 2, to get the actual number of bytes.

See metalink note: 257772.1 - CLOBs and NCLOBs character set storage in Oracle Release 8i, 9i and 10g for an overview.


Freek D'Hooge
Oracle Database Administrator
tel. +32 (0)3 451 23 82

Received on Sun Jan 18 2009 - 16:33:09 CST

Original text of this message