Re: Indexes
From: John Hurley <johnbhurley_at_sbcglobal.net>
Date: Fri, 12 Jun 2009 15:55:59 -0700 (PDT)
Message-ID: <003bbbc0-a25d-43cd-81dc-829dc13d7a42_at_e21g2000yqb.googlegroups.com>
On Jun 12, 5:50 pm, The Magnet <a..._at_unsu.com> wrote:
> This is a concept that I'm trying to grasp. It happened to us as we
> had a corrupted index that was throwing an ORA-600 and the index
> needed to be rebuilt.
>
> The index was tied to a primary key. Rebuilding the index did not
> help. So, I decided to drop the index and rebuild it. But it would
> not let me drop it because of the primary key.
>
> So I dropped the constraint, dropped the index, then rebuilt the
> primary key and all is well.
>
> My misunderstanding is that when you create a primary or unique key,
> the index is created automatically. So, why when you drop the
> constraint does the index not go with it? Or the other way?
Date: Fri, 12 Jun 2009 15:55:59 -0700 (PDT)
Message-ID: <003bbbc0-a25d-43cd-81dc-829dc13d7a42_at_e21g2000yqb.googlegroups.com>
On Jun 12, 5:50 pm, The Magnet <a..._at_unsu.com> wrote:
> This is a concept that I'm trying to grasp. It happened to us as we
> had a corrupted index that was throwing an ORA-600 and the index
> needed to be rebuilt.
>
> The index was tied to a primary key. Rebuilding the index did not
> help. So, I decided to drop the index and rebuild it. But it would
> not let me drop it because of the primary key.
>
> So I dropped the constraint, dropped the index, then rebuilt the
> primary key and all is well.
>
> My misunderstanding is that when you create a primary or unique key,
> the index is created automatically. So, why when you drop the
> constraint does the index not go with it? Or the other way?
Tom Kyte has this demonstrated pretty clearly in both his website http://asktom.oracle.com and in at least one of his books ... if you do a little searching on his online question and answer database you should run into the answers pretty quickly. Received on Fri Jun 12 2009 - 17:55:59 CDT