Size of a table containing large object columns — clob & blob

When checking a table’s size in Oracle, we usually query dba_sgements.

If a table contains large object columns like blob or clob data type, need to query dba_lobs as well. Below is the query I use quite often for such tables:

SELECT sum( bytes)/1024/1024/1024 size_in_GB FROM dba_segments
WHERE (segment_name = '&1' OR segment_name in (
SELECT segment_name FROM dba_lobs WHERE table_name = '&2'
SELECT index_name FROM dba_lobs WHERE table_name = '&3'));

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s