Database Tuning (MOSC)

MOSC Banner

INDEXES NOT USED

edited Jul 2, 2009 9:50PM in Database Tuning (MOSC) 14 commentsAnswered
 Hi there,
here is an example for strange Oracle behaviour:

We have got an application which does not use indexes for big tables when running it against production environment. In the test environment indexes are being used for all tables.

We create statistics and rebuild the indexes  by using the following script:

REM ***** Settings
set pagesize 0
set linesize 200
set heading off
set feedback off
set serveroutput off
set echo off

REM ***** Skript for Reorganisation of Indexes.

spool RebIdx.sql

select
    'alter index '||index_name||' rebuild tablespace IDXTBS online;'
from
    user_indexes
where
    not index_type = 'LOB';

spool off

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center