Is this possible? Or at least I'm looking to have a list of the size of all rows in a table.
if you're interested in the average row length, you could analyze the table (with the DBMS_STATS package), then query ALL_TABLES. avg_row_len . It may return lower value than sum of column lengths in bytes.
You can do with an auxiliary operation. Firstly number the rows by row_number() function and then order by them : select * from ( select row_number() over (order by 0) rn, t.
select segment_name,segment_type, sum(bytes/1024/1024/1024) GB from dba_segments where segment_name='&Your_Table_Name' group by segment_name,segment_type; Storage.
MS SQL server allows only 8060 bytes of data max to be stored in a row. Hence your row size will always be <= 8060. But it is relaxed when a table contains varchar, nvarchar, varbinary, sql_variant, or CLR user-defined type colums.
select vsize(col1) + vsize(col2) + vsize(col3) +
long_raw_length_function(long_col) + DBMS_LOB.GETLENGTH(blob_col)
from table
where id_col = id_val;
for the long_raw_length_function, see this Get the LENGTH of a LONG RAW
if you're interested in the average row length, you could analyze the table (with the DBMS_STATS package), then query ALL_TABLES.avg_row_len
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With