All,
I have analyzed the tables today in my database, it's showing me avg_row_len of some of tables 0 !
Can anybody pelase throw some light on this please !
Thanks in advance,.
Printable View
All,
I have analyzed the tables today in my database, it's showing me avg_row_len of some of tables 0 !
Can anybody pelase throw some light on this please !
Thanks in advance,.
Hi,
what is the num_rows -param of this tables
are they emtpy?
Orca
:cool:
are they empty?
It appears that avg_row_len goes hand in hand with num_rows, if there is no data to be averaged then you will get a 0.
MH
SQL>select owner, table_name,AVG_ROW_LEN, NUM_ROWS
from dba_tables
where owner='X-Mas_poo'
ORDER BY 3
Yes the tables for which avg_row_len is 0 are empty.
ORACA777: what exactly mean by what is the num_rows of table ??
Thanks
Hi,
its a column in dba_tables which is written from an analyze on this table
Orca:cool:Code:
NUM_ROWS NUMBER Y The number of rows in the table
I am checking from dba_tables only,
when I fire table_name, sum(avg_row_len) from dba_tables,
I get some tables with avg_row_len zero and they really6 haev no data in it i.e 0 records.
Why is that ?
My understanding is that avg_row_len is just that - it is the average real length of the rows, which is less than the maximum because varchar2() only takes the space needed (plus a little bit) unlike char() where trailing spaces are included. If there are no rows this average can't be calculated. I guess it should be NULL not zero!
if you dont have any rows how do you suppose to calculate the average row length?
common sense
Why is this an "urgent" problem?
MH
Sorry, Urgent because I am supposed to do some basic sizing structures on this statistics, table growth etc. and I could not even start due to this.. Anyway thanks all for your time ..
So just to summarize can I say that I got avg_row_len 0 because there were 0 rows ? ( frankly I wasn't aware of this !)
Thanks..
MH - If you don't understand it, it could mean the the db is ****ed. It might have been urgent.
I dont understand... so common sense a thread with 11 posts!
If you are given a table with 0 rows how do you calculate the average row length?
Let´s do some mathematics
If there were 10 rows I would simply
sum(row_length)/num_rows
if num_rows is 0 what we get?
infinity
I disagree, if that is your only guidlinde for a fawked database, your job may be in jeapordy.Quote:
Originally posted by DaPi
MH - If you don't understand it, it could mean the the db is ****ed. It might have been urgent.
MH
MH - If I don't understand, I worry. I think that has helped me to keep my job!
You must spend a LOT of time worrying then because I have yet to met anyone that undestands all things available in Oracle. Curios, yes, worry, no.
I will end this verbal tit for tat now and wish you all good holiday cheer.
MH