-
Calculating Row Size
Hi all,
I was trying to calculate the size of a single row in a table with user_tab_columns view. user_tab_columns.Data_length provides the size of each columns and I'm trying to add all of them. For date columns and character columns its working fine. But Data_length is showing 22 for all number columns regard less of its scale and precision. Hence I guess its not judicious to use user_tab_columns.Data_length for calculating the size of number columns. Can you please suggest a possible work around for the issue.
regards
Issac.
-
analyze the table - then get avg_row_len from user_tables
-
Code:
select avg(vsize(my_num_col)) from my_table
-
... and btw, the scale and precision of the number type has no effect on storage requirement.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|