Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Index Questions

Re: Index Questions

From: David Fitzjarrell <fitzjarrell_at_cox.net>
Date: 13 Jul 2004 21:37:44 -0700
Message-ID: <9711ade0.0407132037.16d3894@posting.google.com>


Comments embedded.

melliott42_at_yahoo.com (Michael) wrote in message news:<91721cf.0407131451.737d98b_at_posting.google.com>...
> Hello,
>
> In Oracle 8i on Solaris how can I:
>
> 1. Determine the SQL used to create an existing index?

You might find such code in DBA_SOURCE, or USER_SOURCE. Alternatively you can export the schema then run imp with the indexfile parameter:

imp user/pass file=mydat.dmp full=y indexfile=mydat.sql

then peruse the file created. It will be chock full of CREATE INDEX statements.

> 2. Rebuild an Index that may be corrupt or have
> invalid data?

Alter index <indexname> rebuild;

Although why you'd need to rebuild an index is a mystery to me, since indexes don't really benefit from a rebuild, nor does performance improve. Unless you have other issues causing an index to become corrupted, making a rebuild necessary. And, even then, you've only treated a symptom, and not the underlying cause.

> 3. Look for any errors that may have occured as a
> result of an Index Primary\Foreign Key failing?
>

How does a primary key 'fail'? I suspect you are tilting at windmills in your quest to solve a problem. A bit more information would be appreciated, such as error numbers and text, SQL statements that are experiencing errors, etc.  

> Thanks,
>
> Michael

David Fitzjarrell Received on Tue Jul 13 2004 - 23:37:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US