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

Home -> Community -> Usenet -> c.d.o.misc -> INDEX CREATE

INDEX CREATE

From: Tay, Virginia <htay_at_geocities.com>
Date: Thu, 15 Jul 1999 11:25:40 -0400
Message-ID: <96936058@NEWS.SAIC.COM>


Hi...

I have a question...and need you all help promptly....

I have one PL/SQL script to run for a table. The table has an UNIQUE INDEX (col1 + col2 + col3). Now I would like create an NON-UNIQUE INDEX (col1 + col2 + col3) and I got the following error...

ORA-00054: resource busy and acquire with NOWAIT specified

I need the NON-UNIQUE INDEX to run the PL/SQL more sufficient and faster.....But without the UNIQUE INDEX it is tremendously slow....Any thoughts to solve the problem??? The following is my PL/SQL script

DECLARE
CURSOR memory is

    select distinct

        col1,
        col2
        col3
    from
        my_table;

--EXECUTABLE SECTION
BEGIN
    FOR i in memory LOOP

        delete from my_table
            where col1 = i.col1
            and col2 = i.col2
            and col2 = i.col3;

        insert into my_table (col1,col2,col3)
            values (i.col1,i.col2,i.col3);

    END LOOP; COMMIT;
END; / Received on Thu Jul 15 1999 - 10:25:40 CDT

Original text of this message

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