Home » RDBMS Server » Server Administration » Table and index size
Table and index size [message #64563] Tue, 08 February 2005 07:25 Go to next message
Migke
Messages: 1
Registered: February 2005
Junior Member
Hi,

i have tables, primary keys and indexes in only one tablespace so i want to move the primary keys and index to a different tablespace but i first want to calculate the size of those primary keys and indexes.

how can i do that? i tried to use dba_segments an dba_extents but i realy dont understant to much and the difference between them.
Re: Table and index size [message #64564 is a reply to message #64563] Tue, 08 February 2005 08:24 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
--
-- add the where clause tablespace_name=yourtablespacename
-- segment_name should be your TABLE_NAME/index_name 
mag@mutation_mutation > get size
  1  Prompt size of tables
  2  select sum(bytes/(1024 * 1024)) "size_in_megs" from dba_segments where segment_type='TABLE' and owner='MAG';
  3  prompt size of indexes
  4* select sum(bytes/(1024 * 1024)) "size_in_megs" from dba_segments where segment_type='INDEX' and owner='MAG';
mag@mutation_mutation > @size
size of tables

size_in_megs
------------
       .3125

size of indexes

size_in_megs
------------
       .0625


But to address your root issue,
seperating index and table data into different tablespaces is just an old myth ( UNLESS you are still
operating your databases/servers in OLD FASHION.)

Now It not bad to have the table data and index data in same tablespace.
long back, servers just have a series are hard disks ( hard disks that spin ...pretty slow).
so seperating index and table data in different tablespaces that reside in different disks may help.

Now
Almost any "server" configured machine comes with some kind of RAID or raw partitions etc ( and disk rpm is way way way better).
so seperating tablespaces MOSTLY has no effect on physical I/O.
Eventhough, i would never worry about physical I/O.
I would worry only about LOGICAL I/O.
Previous Topic: add a deleted datafile again.
Next Topic: Dropping multiple tables.
Goto Forum:
  


Current Time: Fri Sep 27 04:17:25 CDT 2024