, ,

Size of CLOB or BLOB in Oracle DB

пятница, 25 октября 2013 г. Оставить комментарий

This is a simple query that returns the size of the blob or clob.


select '&TABLE' as table_name, '&COLUMN_NAME' as column_name, sum(dba_segments.BYTES) / 1024 / 1024 as Mb
from dba_segments
where (dba_segments.owner, dba_segments.segment_name) in
(
-- lob segments
select dba_lobs.owner, dba_lobs.segment_name
from dba_lobs
where dba_lobs.owner = '&OWNER' and
dba_lobs.table_name = '&TABLE' and
dba_lobs.column_name = '&COLUMN_NAME'
union all
-- lob index segments
select dba_lobs.owner, dba_lobs.index_name
from dba_lobs
where dba_lobs.owner = '&OWNER' and
dba_lobs.table_name = '&TABLE' and
dba_lobs.column_name = '&COLUMN_NAME'
);

See also:

Size of table in Oracle
Размер Clob


0 коммент. »

Оставьте Ваш комментарий