This discussion is archived
10 Replies Latest reply: May 9, 2013 11:43 AM by 972227 RSS

table size and no. of rows relation

972227 Newbie
Currently Being Moderated
Hello Guys, does the size of a table and no. of rows of a table have any relation.
SQL> select count(*) from TES.xxx_xxx_xxxx_xxxx;

  COUNT(*)
----------
         0
SQL> select sum(bytes)/1024/1024/1024 from dba_segments where segment_name='xxx_xxx_xxxx_xxxx';

SUM(BYTES)/1024/1024/1024
-------------------------
                   2.4375
when I check the size of the table from querying the dba_segments and toad, it is showing me that the size of the table is 2.4GB, but when I do the select coutn(*), I am getting the result ZERO.
What could be the meaning of this, Does it mean that someone instead of truncating the table, did a delete all rows from the table and the extents weren't deallcoated from the table?



The same table is present in other databases as well and this table in those databases have 0 rows and show the size as NULL when I query the dba_segments and toad.
SQL> select count(*) from TES.xxx_xxx_xxxx_xxxx;

  COUNT(*)
----------
         0
SQL> select sum(bytes)/1024/1024/1024 from dba_segments where segment_name='xxx_xxx_xxxx_xxxx';

SUM(BYTES)/1024/1024/1024
-------------------------
Edited by: 969224 on May 9, 2013 9:51 AM

Edited by: 969224 on May 9, 2013 9:56 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points