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

  • From: D'Hooge Freek <Freek.DHooge@xxxxxxxxx>
  • To: "martin.a.berger@xxxxxxxxx" <martin.a.berger@xxxxxxxxx>, "yong321@xxxxxxxxx" <yong321@xxxxxxxxx>
  • Date: Sun, 18 Jan 2009 23:33:09 +0100

Martin,

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.

regards,

Freek D'Hooge
Uptime
Oracle Database Administrator
e-mail: freek.dhooge@xxxxxxxxx
tel. +32 (0)3 451 23 82
http://www.uptime.be
--
//www.freelists.org/webpage/oracle-l


Other related posts: