RE: Analyzing indexes

2003-03-11 Thread Whittle Jerome Contr NCI
Title: RE: Analyzing indexes






Chuck,


Do you think these indexes are corrupt? Validate structure doesn't give you statistics like Compute Statistics or Estimate Statistics does.

Jerry Whittle

ASIFICS DBA

NCI Information Systems Inc.

[EMAIL PROTECTED]

618-622-4145


-Original Message-

From: Chuck Hamilton [SMTP:[EMAIL PROTECTED]


I need to determine whether or not a couple of indexes need to be rebuilt.

The problem is the indexes are quite large and on a 24x7 high volume

database. If I try to run an analyze validate structure to gather the data

I need to make that decision, it sets a lock on the table for about an hour

which I can't afford to do. There is no slow time when I can do this and

management has said before they're not going to spring for the partitioning

option to break the indexes up into managable pieces. Is there some other

way I can get the information needed to determine if an index needs to be

rebuilt or not without setting a lock on the table? We are on Oracle 8.1.7.





Re: Analyzing indexes

2003-03-11 Thread Chuck Hamilton
RE: Analyzing indexesNo but validate structure populates the index_stats
view which is the only way I know of to get the index height, leaf rows,
deleted leaf rows, and pct. of used space which is what I normally use in
determining if an index needs to be rebuilt or not. Is there another way?

- Original Message -
To: Multiple recipients of list ORACLE-L
Sent: Tuesday, March 11, 2003 10:49 AM


Chuck,
Do you think these indexes are corrupt? Validate structure doesn't give you
statistics like Compute Statistics or Estimate Statistics does.
Jerry Whittle
ASIFICS DBA
NCI Information Systems Inc.
[EMAIL PROTECTED]
618-622-4145
-Original Message-
I need to determine whether or not a couple of indexes need to be rebuilt.
The problem is the indexes are quite large and on a 24x7 high volume
database. If I try to run an analyze validate structure to gather the data
I need to make that decision, it sets a lock on the table for about an hour
which I can't afford to do. There is no slow time when I can do this and
management has said before they're not going to spring for the partitioning
option to break the indexes up into managable pieces. Is there some other
way I can get the information needed to determine if an index needs to be
rebuilt or not without setting a lock on the table? We are on Oracle 8.1.7.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Chuck Hamilton
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: Analyzing indexes

2003-03-11 Thread Jared . Still
Chuck,

I've been convinced that rebuilding indexes is a waste of time.

In fact, it can cost you time, as rebuilding indexes can kill your
peformance while the indexes again seek their 'level'.

Check into at asktom.oracle.com.  There's some good examples.

jared





Chuck Hamilton [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
 03/11/2003 06:30 AM
 Please respond to ORACLE-L

 
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
cc: 
Subject:Analyzing indexes


I need to determine whether or not a couple of indexes need to be rebuilt.
The problem is the indexes are quite large and on a 24x7 high volume
database. If I try to run an analyze validate structure to gather the 
data
I need to make that decision, it sets a lock on the table for about an 
hour
which I can't afford to do. There is no slow time when I can do this and
management has said before they're not going to spring for the 
partitioning
option to break the indexes up into managable pieces. Is there some other
way I can get the information needed to determine if an index needs to be
rebuilt or not without setting a lock on the table? We are on Oracle 
8.1.7.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Chuck Hamilton
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Analyzing indexes

2003-03-11 Thread DENNIS WILLIAMS
Chuck
   I think Jared has some excellent advice (as usual).
   Interestingly, while you may need to lock the table while analyzing the
table, you may be able to rebuild it without locking it. According to the
Oracle Education notes, Oracle8i introduced a method of re-creating and
existing index while allowing concurrent operations on the base table. The
syntax is
   ALTER INDEX xxx REBUILD ONLINE;
or
   ALTER INDEX xxx COALESCE;
If you really feel you must do something, the coalesce may be a lower-risk
solution. It won't lower the height, but as Jared points out, that may be of
only temporary value. Either way, I'd try it in test first.

Dennis Williams
DBA, 40%OCP, 100% DBA
Lifetouch, Inc.
[EMAIL PROTECTED] 


-Original Message-
Sent: Tuesday, March 11, 2003 1:04 PM
To: Multiple recipients of list ORACLE-L


Chuck,

I've been convinced that rebuilding indexes is a waste of time.

In fact, it can cost you time, as rebuilding indexes can kill your
peformance while the indexes again seek their 'level'.

Check into at asktom.oracle.com.  There's some good examples.

jared





Chuck Hamilton [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
 03/11/2003 06:30 AM
 Please respond to ORACLE-L

 
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
cc: 
Subject:Analyzing indexes


I need to determine whether or not a couple of indexes need to be rebuilt.
The problem is the indexes are quite large and on a 24x7 high volume
database. If I try to run an analyze validate structure to gather the 
data
I need to make that decision, it sets a lock on the table for about an 
hour
which I can't afford to do. There is no slow time when I can do this and
management has said before they're not going to spring for the 
partitioning
option to break the indexes up into managable pieces. Is there some other
way I can get the information needed to determine if an index needs to be
rebuilt or not without setting a lock on the table? We are on Oracle 
8.1.7.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Chuck Hamilton
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: Analyzing indexes

2003-03-11 Thread Jonathan Lewis

If you want the index height (or blevel + 1),
then you could dump the index root block

alter system dump datafile N block MM

Check dba_segments for the address of the
segment header block, unless you have
multiple freelist groups, the index root block
will be the one after the segment header.

You will find the blevel of the root block in
the symbolic dump in the line labelled
kdxcolev.


For the 'right size' - I tend to work out roughly
how large a typical index entry ought to be,
multiple by the number of rows I expect to
have non-null entries - add a bit (for rowids)
and multiple by 4/3 (to allow for typical wastage).
If the result is about right, I stop worrying.

(NB  There may be special case indexes where
you have a finer knowledge of the application
and therefore use a value other than 4/3).


Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

Now available One-day tutorials:
  Cost Based Optimisation
  Trouble-shooting and Tuning
  Indexing Strategies

(see http://www.jlcomp.demon.co.uk/tutorial.html )

UK___March 19th
UK___April 8th
UK___April 22nd

USA_(FL)_May 2nd


Next dates for the 3-day seminar:
(see http://www.jlcomp.demon.co.uk/seminar.html )

UK_(Manchester)_May
USA_(CA, TX)_August


The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html


- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: 11 March 2003 14:30


 I need to determine whether or not a couple of indexes need to be
rebuilt.
 The problem is the indexes are quite large and on a 24x7 high volume
 database. If I try to run an analyze validate structure to gather
the data
 I need to make that decision, it sets a lock on the table for about
an hour
 which I can't afford to do. There is no slow time when I can do this
and
 management has said before they're not going to spring for the
partitioning
 option to break the indexes up into managable pieces. Is there some
other
 way I can get the information needed to determine if an index needs
to be
 rebuilt or not without setting a lock on the table? We are on Oracle
8.1.7.


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jonathan Lewis
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).