-
All,
this week-end (yippie, I've got a 7 days workweek) we're going to put our DB's from WinNT to Unix.
I'm reading a few books about exporting,... tables, ... and I've read that its best to put your initial extent big enough to contain nearly all your data.
Therefore I want to calculate the size of each object to make all the initial extents perfect (for the moment we use defaults the old DBA left us, and since we have tables with only 50 rows and tables with 2500000 rows, I think it's better to make a different setup for them), but I don't know how to calculate them.
I tried the DBA_objects_size view, but this is apparently something else.
Can anyone help me with this (or come over to belgium this week-end to give a hand ;-))))) ) ?
Thx,
Rik
-
Run following command for all tables.
analyze table table_name compute statistics;
Now you can check user_tables to get num_rows and
avg_row_len. multiply these values to get approx.
bytes used by this table.
HTH
np70
-
:-)
select owner, segment_name, extents from dba_segments
where extents>5 and owner not in ('SYS','SYSTEM') order by extents;
select tablespace_name,segment_name, sum(bytes), count(*) ext_quan from dba_extents where tablespace_name = 'LIVE' and segment_type='TABLE' group by tablespace_name,segment_name;
SELECT owner, BLOCKS/(BLOCKS+EMPTY_BLOCKS)*100 as USED_PCT FROM DBA_TABLES WHERE
TABLE_NAME='NEWS_TBL';
Best wishes!
Dmitri
-
Hi,
Add the columns and multiply with no of rows then add 15% to that , that will be your table size.
eg> number(5) and varchar2(5) with 10 rows.
(5+5)*10=100 bytes == 115bytes.
Hope this will help u.
bye
gandhi
-
Thx a lot guys.
I've made a nice estimation for the tables.
Is there also a way to do this for indexes, tablespaces (off coruse the tables-tablespace is sum of all the tables, but for the other ones???),
thx
Rik
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
|