Call (800) 766-1884 for Oracle support & training
Free Oracle Tips


Oracle Consulting Support
Oracle Upgrades
Use New Oracle Features
Oracle Replication Support
Oracle Training
Remote Oracle DBA
System Documentation
Oracle Tips
Oracle Performance
 

Free Oracle Tips


 

HTML Text

BC Oracle tuning

Oracle training

Oracle support

Remote Oracle

Redneck
 

 

Donald K. Burleson

Oracle Tips

Find indexes not in the KEEP Pool

A common problem occurs when an Oracle professional recognizes the benefit of placing small, frequently referenced tables in the KEEP pool, but forgets to place the associated indexes in the KEEP pool.

Just as you want frequently referenced tables in the KEEP pool, you also want to cache the indexes to minimize disk I/O.

set pages 999

set echo off

 

spool t.lst

 

col c1 heading 'Index|Name'   format a30

col c2 heading 'Table|Name'   format a30

col c3 heading 'Index|Blocks' format 999,999,999,999

 

 

select

   index_name    c1,

   t.table_name  c2,

   s.blocks      c3

from

   dba_indexes    i,

   dba_tables     t,

   dba_segments   s

where

   t.table_name = i.table_name

and

   i.index_name = s.segment_name

and

   t.buffer_pool = 'KEEP'

and

   i.buffer_pool <> 'KEEP'

;

 

select

   'alter index '||i.owner||'.'||index_name||' storage (buffer_pool KEEP);'

from

   dba_indexes    i,

   dba_tables     t,

   dba_segments   s

where

   t.table_name = i.table_name

and

   i.index_name = s.segment_name

and

   t.buffer_pool = 'KEEP'

and

   i.buffer_pool <> 'KEEP'

;

 

select

   sum(s.blocks) add_to_keep_pool

from

   dba_indexes    i,

   dba_tables     t,

   dba_segments   s

where

   t.table_name = i.table_name

and

   i.index_name = s.segment_name

and

   t.buffer_pool = 'KEEP'

and

   i.buffer_pool <> 'KEEP'

;

If you like Oracle tuning, you might enjoy my latest book “Oracle Tuning: The Definitive Reference” by Rampant TechPress.  It’s only $41.95 (I don’t think it is right to charge a fortune for books!) and you can buy it right now at this link:

http://www.rampant-books.com/book_2003_1_oracle9i_sga.htm

 

”call

  
 

Oracle performance tuning software 
 
 
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 
   

Copyright © 1996 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.