RE: is there a way to alter index to unique ??
Posted in 2009
Topics: Clustering, Grid & MACH11
I didn't see an answer to his last question, so:
> > Is there a way to alter an index to cluster??
ALTER INDEX index_name TO CLUSTER
This should do the trick for you.
--EEM
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
LYNKZ
> MIKE
> Sent: Wednesday, June 24, 2009 8:33 AM
> To: ids@iiug.org
> Subject: Re: is there a way to alter index to unique ?? [16148]
>
> Hi, yeah, i was thinking to do that, instead of having to create twice
the
> index to delete duplicated rows, once to make delete statements run
fast and
> second time to create the index unique.
>
> I will attemp to have the unique index with filtering so i will not to
have to
> recreate and delete the duplicated rows.
>
> Oops, in II I forgot you have to use SET INDEXES <indexname> TO
FILTERING;
> before loading the data.
>
> Art
>
> Art S. Kagel
> Oninit (www.oninit.com)
> IIUG Board of Directors (art@iiug.org)
>
> Disclaimer: Please keep in mind that my own opinions are my own
opinions and
> do not reflect on my employer, Oninit, the IIUG, nor any other
organization
> with which I am associated either explicitly or implicitly. Neither do
> those opinions reflect those of other individuals affiliated with any
entity
> with which I am affiliated nor those of the entities themselves.
>
> On Tue, Jun 23, 2009 at 7:19 PM, Art Kagel <art.kagel@gmail.com>
wrote:
>
> > Do it this way instead:
> >
> > Two scenarios:
> >
> > I:
> >
> > 1. Drop unique index
> > 2. Load the data
> > 3. START VIOLATIONS on the table.
> > 4. Recreate the UNIQUE index WITH FILTERING.
> > 5. Delete the duplicates from the violations tables.
> >
> > Scenario II is the same but you:
> >
> > 1. Keep the index in place,
> > 2. START VIOLATIONS
> > 3. Load the data
> > 4. Delete the duplicates from the violations tables
> >
> >
> > Art S. Kagel
> > Oninit (www.oninit.com)
> > IIUG Board of Directors (art@iiug.org)
> >
> > Disclaimer: Please keep in mind that my own opinions are my own
opinions
> > and do not reflect on my employer, Oninit, the IIUG, nor any other
> > organization with which I am associated either explicitly or
implicitly.
> > Neither do those opinions reflect those of other individuals
affiliated
> > with any entity with which I am affiliated nor those of the entities
> > themselves.
> >
> >
> >
> >
> > On Tue, Jun 23, 2009 at 5:31 PM, LYNKZ MIKE <yellr@telecom.com.co>
wrote:
> >
> >> Hi everyone, i have a question: Is there a way to modify or alter a
index
> >> to
> >> unique??
> >>
> >> This is because we are going to load data on tables where we could
insert
> >> duplicated rows, si eliminate those rows, we would like to:
> >>
> >> 1- drop unique index
> >> 2- load the data
> >> 3- create index
> >> 4- Eliminate duplicated rows using the index
> >> 5- Alter index to unique
> >>
> >> Is there a way to alter an index to cluster??
> >>
> >> Thanks in advanced.
> >>
> >> Note:
> >> I tried to use the set indexes disabled and then set indexes
enabled, but
> >> i
> >> thought i could use the filtering option to eliminate the
duplicated rows
> >> from
> >> the table, but just put them in a table it does not delete them
from
> >> table.
> >>
> >>
> >>
> >>
>
************************************************************************
******
> *
> >> Forum Note: Use "Reply" to post a response in the discussion forum.
> >>
> >>
> >
>
>
>
************************************************************************
******
> *
> Forum Note: Use "Reply" to post a response in the discussion forum.
Sorry i meant to unique not to cluster.
I didn't see an answer to his last question, so:
> > Is there a way to alter an index to cluster??
ALTER INDEX index_name TO CLUSTER
This should do the trick for you.