DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: How come Index tablespace is so big?

  1. #1
    Join Date
    Mar 2001
    Posts
    149
    Hello all, I have a database that was created a little while ago and by looking at the sizes of the tablespace I find that the Index_data1 tablespace is much bigger than data1 tablespace, I'm not sure what why this is the case, how can I fix this problem?? Another newbie question, what's TWO_TASK parameter in Oracle, what is it used for? Thank you all.

  2. #2
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    The size of the tablespace in itself should not be problem. Check what are the objects in the tablespace. If you are purging the base tables regularly you should rebuild the indexes. It will release some free space.

    Sanjay

  3. #3
    Join Date
    Jan 2001
    Posts
    3,134
    In a word "fragmentation".

    You may need to rebuild.

    MH
    I remember when this place was cool.

  4. #4
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378
    Using different tablespaces (on different disks)
    for a table and its index
    produces better performance
    than storing the table and index
    in the same tablespace, due to
    reduced disk contention.

    (change schema/index names to your satisfaction and rebuild all your indexes)

    spool c:\temp\spools\index_rebuild.sql

    select 'alter index '|| OWNER ||'.'|| INDEX_NAME ||'
    rebuild
    tablespace INDX01;'
    FROM dba_indexes
    where owner = 'INDEX_OWNER'
    AND tablespace_name = 'TABLESPACE_NAME';

    spool off;

    @c:\temp\spools\index_rebuild.sql

  5. #5
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    Originally posted by newbie
    what's TWO_TASK parameter in Oracle, what is it used for? Thank you all.
    i have not tested this , let me know after testing

    TWO_TASK is used to specifiy a SQLNET or NET8 connect alias. Not necessarily the Oracle SID. When you set TWO_TASK to any value, including NULL. You will not be able to connect internal, because at that point you are going through a sql*net and Oracle can't valid the user id as belonging to the dba group.

    You should not set TWO_TASK anytime you want to connect internal if you are logged directly on the server.

    ORACLE_SID should always be set in the users environment when they are working with Oracle.
    siva prakash
    DBA

  6. #6
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    You can find out about the following using the DBMS_SPACE package if you analyze your tables. I do an analyze compute, that would be best if you can do it.

    I wrote a simple script to look at one table. You will obviously want to change it to produce a report of all of your indexes.

    DECLARE
    mysegment_owner varchar2(200);
    mysegment_name varchar2(200);
    mysegment_type varchar2(200);
    mytotal_blocks number;
    mytotal_bytes number;
    myunused_blocks number;
    myunused_bytes number;
    mylast_used_extent_file_id number;
    mylast_used_extent_block_id number;
    mylast_used_block number;
    BEGIN
    mysegment_owner := 'CSCS';
    mysegment_name := 'TB_CASE';
    mysegment_type := 'TABLE';
    DBMS_SPACE.unused_space(
    mysegment_owner,
    mysegment_name,
    mysegment_type,
    mytotal_blocks,
    mytotal_bytes,
    myunused_blocks,
    myunused_bytes,
    mylast_used_extent_file_id,
    mylast_used_extent_block_id,
    mylast_used_block);
    dbms_output.put_line( 'mytotal_blocks '|| mytotal_blocks);
    dbms_output.put_line( 'mytotal_bytes '|| mytotal_bytes);
    dbms_output.put_line( 'myunused_blocks '|| myunused_blocks);
    dbms_output.put_line( 'myunused_bytes '|| myunused_bytes);
    dbms_output.put_line( 'mylast_used_extent_file_id '|| mylast_used_extent_file_id);
    dbms_output.put_line( 'mylast_used_extent_block_id '|| mylast_used_extent_block_id);
    dbms_output.put_line( 'mylast_used_block '|| mylast_used_block);
    END;
    /

  7. #7
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    does it really improve performamce though jgmagnus?

    interesting discussion on this topic here.........

    http://groups.google.com/groups?hl=e...om%26rnum%3D12


    I'm stmontgo and I approve of this message

  8. #8
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by stmontgo
    does it really improve performamce though jgmagnus?
    Yeah, another one of those old myths that float around in Oracle comunity and refuse to sink....
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  9. #9
    Join Date
    Sep 2000
    Location
    Sao Paulo,SP,Brazil, Earth, Milky Way
    Posts
    350
    I was thinking in two situations : rebuilding an index (example : after data loads), and IOTs readings (or any SELECT what can be satisfied only by index reads). In this situations, isolating the required index tablespaces in another disks with another controllers can be a good thing for performance, or no ?

    Regards,

    Chiappa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width