Home » SQL & PL/SQL » SQL & PL/SQL » Determining size of database/tables (Oracle8 / Solaris8)
Determining size of database/tables [message #321906] Wed, 21 May 2008 15:34 Go to next message
thorin666
Messages: 144
Registered: March 2007
Senior Member

Hi, i am trying to determine the size of a database
and i get this
select sum(bytes)/1024/1024 "Meg" 
from dba_data_files;

       Meg
----------
     72720

select round(sum(blocks*8192/1024/1024)) "total Mb." 
from dba_tables;

 total Mb.
----------
    113327


my question is
how can i get a higher size on tables that datafiles?
Re: Determining size of database/tables [message #321907 is a reply to message #321906] Wed, 21 May 2008 15:36 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>how can i get a higher size on tables that datafiles?
because dba_tables can only report values from last time statistics were collected; which can no longer reflect reality.
Re: Determining size of database/tables [message #321908 is a reply to message #321907] Wed, 21 May 2008 15:42 Go to previous messageGo to next message
thorin666
Messages: 144
Registered: March 2007
Senior Member

anacedent wrote on Wed, 21 May 2008 15:36
>how can i get a higher size on tables that datafiles?
because dba_tables can only report values from last time statistics were collected; which can no longer reflect reality.

ok then i must run all statistics again or check for another view?
Re: Determining size of database/tables [message #321909 is a reply to message #321906] Wed, 21 May 2008 15:51 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>ok then i must run all statistics again or check for another view?
What is wrong with the answer from dba_data_files?

How will you know when you have the 'correct' answer?


What problem are you really trying to solve?
Re: Determining size of database/tables [message #321911 is a reply to message #321909] Wed, 21 May 2008 15:58 Go to previous messageGo to next message
thorin666
Messages: 144
Registered: March 2007
Senior Member

anacedent wrote on Wed, 21 May 2008 15:51
>ok then i must run all statistics again or check for another view?
What is wrong with the answer from dba_data_files?

How will you know when you have the 'correct' answer?


What problem are you really trying to solve?

ok understand...
1.- run statistics again
2.- after that ill get the correct size
Re: Determining size of database/tables [message #321913 is a reply to message #321906] Wed, 21 May 2008 16:01 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>1.- run statistics again
>2.- after that ill get the correct size
No you won't, but you'll learn that lesson soon enough.

How will you know when you have the 'correct' answer?

What problem are you really trying to solve?

Why do you expect folks to keep answering your questions when you do NOT answer questions asked of you?
Re: Determining size of database/tables [message #321916 is a reply to message #321913] Wed, 21 May 2008 16:08 Go to previous messageGo to next message
thorin666
Messages: 144
Registered: March 2007
Senior Member

anacedent wrote on Wed, 21 May 2008 16:01
>1.- run statistics again
>2.- after that ill get the correct size
No you won't, but you'll learn that lesson soon enough.

How will you know when you have the 'correct' answer?

What problem are you really trying to solve?

Why do you expect folks to keep answering your questions when you do NOT answer questions asked of you?

ok i thinked that you question me to quest myself
is obvious that if i use dba_views i want to be up to date

My real problem is to know WHY the tables use more that datafiles
maybe i was wrong with my sqls,

You show me that if i have the statistics no up to date, ill cant get the correct size or whatever what i want to check using the dictionary views (or i am wrong?)

that´s my answer and that´s why i am running right now a estimate statistics to the database
Re: Determining size of database/tables [message #321980 is a reply to message #321906] Thu, 22 May 2008 00:39 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First thing that comes into mind: are you sure your block size is 8K?

Second thing: don't use dba_tables for segment (physical) information, use dba_segments.

Regards
Michel
Previous Topic: alternative for mutating error
Next Topic: Concurrency problem in cursor
Goto Forum:
  


Current Time: Thu Dec 08 10:20:52 CST 2016

Total time taken to generate the page: 0.08900 seconds