yongsing
asked on
How to estimate database size?
We have an Oracle database 10g on Solaris platform. There are dozens of tables in it. We would like to estimate the disk space growth per year for the database. If we have table definition for each table, as well as the estimated number of rows added per table per year, are we able to estimate the disk space growth per year?
Thanks.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Does the following query return the maximum row length for each table?
select table_name, sum (data_length)
from dba_tab_columns
group by table_name
order by 1;
If I expect the table to grow by 1000 rows per year, can I multiply the maximum row length by 1000 to get the disk usage per year? Is it so simple?
What about other factors like blocks, which I read about in the articles?
select table_name, sum (data_length)
from dba_tab_columns
group by table_name
order by 1;
If I expect the table to grow by 1000 rows per year, can I multiply the maximum row length by 1000 to get the disk usage per year? Is it so simple?
What about other factors like blocks, which I read about in the articles?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi rrjegan17,
Let's say that I have a table called ABC. Initially, when created, it has zero records. After that, it is estimated that 1000 new records will be inserted into this table every year. So you are saying that the query below will tell me the disk size growth for this table for every year?
select table_name, (sum (data_length) / 1048576) * 1000
from dba_tab_columns
where table_name = 'ABC'
group by table_name;
What about indexes? Shouldn't we estimate for indexes as well?
Let's say that I have a table called ABC. Initially, when created, it has zero records. After that, it is estimated that 1000 new records will be inserted into this table every year. So you are saying that the query below will tell me the disk size growth for this table for every year?
select table_name, (sum (data_length) / 1048576) * 1000
from dba_tab_columns
where table_name = 'ABC'
group by table_name;
What about indexes? Shouldn't we estimate for indexes as well?
If you have zero records now, then it would say it as 0 after 1 year too. You should have some random occurences of records to estimate your Data_length correctly.
This will give the size estimates for your indexes:
select sum(bytes) from dba_segments
where segment_type="INDEX";
Again you need to have some sample values for the calculation to give out some valid result.
This will give the size estimates for your indexes:
select sum(bytes) from dba_segments
where segment_type="INDEX";
Again you need to have some sample values for the calculation to give out some valid result.
Some other methods below:
http://www.dba-oracle.com/t_script_oracle_table_size.htm
http://decipherinfosys.wordpress.com/2007/01/24/estimating-projecting-the-size-of-a-table-in-oracle/
Hope this helps
Open in new window