Calculate size of row !
Hi all,
I want calculate size of one row in table. I reference some steps to do this such as:
1. Gather statistic of table T2 by : execute DBMS_STATS.GATHER_TABLE_STATS('TEST', 'T2');
2. Calculate total bytes per row
select
3 + avg(nvl(vsize(T_ID),0)+1 +
3. If table T2 has some index, must do this step:nvl(vsize(T_NAME),0)+1 +nvl(vsize(T_VALUE),0) + 1+nvl(vsize(T_DATE),0) + 1) "Total bytes per row"fromtest.t2wheret_id = 1;
And final result is = result at step 2 + result at step 3.select sum(COLUMN_LENGTH)from dba_ind_columnswhere TABLE_NAME = 'T2';
0