ALTER TABLE ENABLE CONSTRAINT FK is very slow

Hello,
The following enable constraint command takes around (15min to be completed)
ALTER TABLE table_name ENABLE CONSTRAINT fk_constraint_name ;table_name: (~133 Millions rows)
Any idea why it takes long to be completed? and what could be done to improve the performance?
Thanks in advance

Enabling a foreign means the database has to check the existence of each value in the child table column against the key in the parent table. Now you say,
The following enable constraint command takes around (15min to be completed)
table_name: (~133 Millions rows)In other words, ithe database is validating about ten million rows a minute. That doesn't seem too shabby. So what would you consider to be a reasonable amount of time to accomplish this task?
Bear in mind the golden rule of tuning: ye cannae break the laws of physics. Acting on large volumes of data must necessarily take some time. You must be realistic.
Also, why is it a problem? This is the sort of task which ought to be undertaken only occasionally. If you're doing it often enough that fifteen nminutes is unacceptably long perhaps you should reconsider why you're disabling the constraint. See whether there's another way to achieve whatever it is you're doing. After all, the most effective way to reduce something's elapsed time is to avoid doing that thing at all.
Cheers, APC

Similar Messages

  • Deadlocks with ALTER TABLE DISABLE CONSTRAINT

    Hello,
    We're deleting millions of redundant rows from a particular table in our live 10g database. This is being done online because the downtime would be unacceptable. The table in question has 30 child tables, so for speed I am disabling the foreign keys using ALTER TABLE DISABLE CONSTRAINT before the deletion (we haven't had any constraint violations for ages). Without this, deletion takes about 1 second per row i.e. a very long time.
    However, we're finding that ALTER TABLE DISABLE CONSTRAINT often reports ORA-00060: deadlock detected. This is causing problems with the live system. Can anyone think of the reason why a deadlock might occur in this situation and what we could do to prevent it happening? Note that any solution has to be doable without downtime unless it takes less than 30 minutes.
    Thanks a lot
    Ed
    Edited by: edwiles on Feb 4, 2009 6:02 AM

    look suggestions in the similar thread:
    Re: Deadlock when deleting a not linked data record in a parent table

  • Can't import DDL file that has alter table rename constraint

    Hi:
    Version 3.1.0.691 on Windows 7 Enterprise 64-bit SP1
    I'm trying to import a DDL file with syntax similar to what's below. The <name> notes that I've replaced the actual names for obfuscation purposes.; the real names are in the script.
    ALTER TABLE <name>
    RENAME CONSTRAINT SYS_C0041150
    TO <name2>_CK;
    ALTER TABLE <name>
    RENAME CONSTRAINT AVCON_1281559518_ACTIV_022
    TO <name2>_CK;
    I get the following error:
    Oracle SQL Developer Data Modeler 3.1.0.691
    Oracle SQL Developer Data Modeler Import Log
    Date and Time: 2012-01-13 16:29:05 PST
    Design Name: <name>
    RDBMS : Oracle Database 11g
              All Statements:           819
              Imported Statements:      0
              Failed Statements:           0
              Not Recognized Statements:      819
    <<<<< Not Recognized >>>>>
    ALTER TABLE <name>
    RENAME CONSTRAINT SYS_<name>
    TO <name2>_CK
    ALTER TABLE <name>
    RENAME CONSTRAINT AVCON_1281559518_QVI_A_000
    TO <name2>_CK
    Thanks for any help you can provide.
    Doc

    Hi:
    The file was indeed comprised of just alter statements. As a test, I trimmed the file down to just one alter statement:
    ALTER TABLE <name> RENAME CONSTRAINT SYS_C0041413 TO <name2>_CK;
    The output file contained exactly the following, where the <<BEGIN OF FILE>> and <<END OF FILE>> were simply added here for clarity. There was no section called
    <<<<< ERRORS >>>>> and the ddl file contained no create table statements.
    <<BEGIN OF FILE>>
    Oracle SQL Developer Data Modeler 3.1.0.691
    Oracle SQL Developer Data Modeler Import Log
    Date and Time: 2012-01-16 10:16:42 PST
    Design Name: <name>
    RDBMS : Oracle Database 11g
              All Statements:           1
              Imported Statements:      0
              Failed Statements:           0
              Not Recognized Statements:      1
    <<<<< Not Recognized >>>>>
    ALTER TABLE <name> RENAME CONSTRAINT SYS_C0041413 TO <name2>_CK
    <<END OF FILE>>
    Other info.
    When I do an model import, none of the existing check constraint names get captured. Also, if I add names afterwards to two separates models via DM and then compare them. The output DDL shows a drop of the target constraint referencing its name, but the recreation of the not null constraint doesnt reference the source constraint name set for it manually in DM. Here's the example I did and the output ddl.
    ALTER TABLE <name>
    DROP CONSTRAINT SYS_C0041413
    ALTER TABLE <name>
    MODIFY ( <column_name> NOT NULL )
    That last line should have read as follows due to the constraint_name I added for it in DM.
    ALTER TABLE <name>
    MODIFY (<column_name> CONSTRAINT <name2>_CK NOT NULL);
    In the example directly above, <name2>_CK is the name I explicity set via DM and would have expected the compare to have used to recreated the constraint since it referenced the target constraint name when it constructed the drop constraint syntax.
    I believe at least one bug is involved here, most likely two.
    The first bug is that model imports are not capturing not null check constraint names.
    The second bug is that the source constraint name is not being used when generating the ddl necessary to change the not null constraint name in the target model.
    All of this is assuming that I haven't just goofed and forgotten to check a box somewhere telling it to do what I've been talking about here. :-)
    Doc

  • ALTER TABLE privilege and CREATE/DROP/ENABLE/DISABLE constraint privilege

    Hi,
    I am looking for some detailed info regarding the below previleges
    ALTER TABLE, CREATE CONSTRAINT, DROP CONSTRAINT, ENABLE CONSTRAINT AND DISABLE CONSTRAINT PRiVILEGES.
    I have two schemas 'A' and 'B', I want to provide user 'A' with Alter table, create or drop constraint,Enable or Disable constraint on schema B.
    Please let me know how to make this work.
    Thank you

    I got the answer for my second question, I have an option to grant 'Alter ANY table' privilege to the user.Yes, but you should not do that.
    Regarding question one, Suppose I have two schemas A and B and I want Schema A to have alter table privilege on all tables of Schema B.
    Can I do this in one command No
    or I need to grant alter on each table saperately?Yes
    If I am chosing the second option for each table saperately then whenever a table is added in schema B we need to grant privilege on that table as well.Yes. But nothing strange there. Designing and creating objects includes the privileges on them.
    If user A is granted with alter table privilege on a table which user B owns then can user A drop/create/enable/disable constraints for that table?Yes, isn't that what all this about?
    Again, letting one user alter the objects of another user is generally not such a good idea. Hope you see this from our discussion.
    Alter table privilege includes adding and dropping columns. This is why I suggested writing a procedure that does exactly what you need. And then grant execute on that to A.
    The best thing of course would be NOT TO disable the constraints, they are probably there for a reason.
    I am currently handling an issue where one session doing this, deadlocks with another session doing only selects - From other tables, that is!
    Regards
    Peter

  • Altering Primary Key constraint on a table i Oracle 10G

    Hi All,
    Can anyone tell me how to alter a primary key constraint on any table. My concern is that, suppose i have a table called 'Employee' where only 'EmployeeName' is added as a primary ket constaint. Now i want to alter this P.K. constarint to add 'EmployeeName' and 'DateOfBirth' as a primary key. Can anyone suggest me how can i achieve that? Any help will be highly appreciated.

    hi,
    you need to drop the constraint and recreate it.
    SQL> conn scott/tiger@alpspso
    Connected.
    SQL> create table test (id number constraint id_pk primary key,name varchar(30));
    create table test (id number constraint id_pk primary key,name varchar(30))
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    SQL> create table test_table (id number constraint id_pk primary key,name varchar(30))
    Table created.
    SQL> alter table test_table modify constraint id_pk primary key(id,name);
    alter table test_table modify constraint id_pk primary key(id,name)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> alter table test_table modify constraint id_pk(id,name);
    alter table test_table modify constraint id_pk(id,name)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> alter table test_table modify primary key(id,name);
    alter table test_table modify primary key(id,name)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> alter table drop constraint id_pk;
    alter table drop constraint id_pk
    ERROR at line 1:
    ORA-00903: invalid table name
    SQL> alter table test_table drop constraint id_pk;
    Table altered.
    SQL> alter table test_table add constraint id_pk primary_key(id,name);
    alter table test_table add constraint id_pk primary_key(id,name)
    ERROR at line 1:
    ORA-00902: invalid datatype
    SQL> alter table test_table add constraint id_pk primary key(id,name);
    Table altered.
    Regards.
    Navneet

  • Order Import program run very slow

    Hi
    I use Order Import program to create sale order from tables interface.But it run very slow,about two hours for one record.
    How can i do it run fast?
    Thanks

    Hi,
    before checking metalink for patches (there are some performance related patches for order entry)
    you should check if statistics OE related tables
    - OE_HEADERS_IFACE_ALL,
    - OE_ORDER_HEADERS_ALL
    - OE_LINES_IFACE_ALL
    - OE_ORDER_LINES_ALL
    are up to date (check column last_analyzed in dba_tables). If not, run gather schema statistics
    program to collect current table statistics for OE schema.
    If this does not help, have a look at metalink and query for "order import" "performance"...
    Regards

  • Send data BPC 5.1 very slow because Antivirus Kaspersky

    Dear All....
    I have problem with BPC 5.1, the problem when send data to server (send and refresh schedule ). The prosses send data is very slow. I think its because antivirus (Kaspersky), when protection is enable, prosses send data very slow. But when i turn off the protection, prosses send data faster...
    The problem is imposible if i turn off protection to every client.
    So, what the object, file, application, macro or rule must i exclusion (unscan) with antivirus??
    I have already give exclusion to file Ev4DMMPM.xla, but sometime its work, sometime not...
    Please help...
    Best regards,
    Dharma Setiadi

    Dear all...
    Thanks for attention.....
    I have already exclusion folder BPC but still not work. But i think the problem with  port. I try turn off scanning with port 80 and its work. I never find slow again...
    But the problem, i can't turn off scanning with port 80, its about security. How about if i change port 80 for BPC..?? What is impact with server and with client..?? And whatever that must be noticed in this port changing..?? setting server manager..??
    Note : i used multi-server configuration...
    Best Regards,
    Dharma Setiadi

  • Altering Primary Key Constraint

    hi this may sound silly .
    but is it possible to alter a primary key constraint and add another column to it ?
    eg. >desc t1
    c1 number(3) not null
    c2 number(3)
    here I have created primary key on column c1.
    Now I want to alter this constraint and add second column also as part of primary key constraint (so that it will be composite primary key )
    How do i do that ? Do the column needs to be empty ?
    Thanks

    You should use ALTER TABLE DROP CONSTRAINT / ADD CONSTRAINT option.
    Do the column needs to be empty ?Because primary key constraint supposes NOT NULL constraints for columns
    included into primary key, all columns havn't to have nulls values (NOT NULL constraint will be added to c2 column):
    SQL> create table t1 (c1 number(3) not null, c2 number(3));
    Table created.
    SQL> alter table t1 add constraint t1_pk primary key(c1);
    Table altered.
    SQL> insert into t1 values(1,1);
    1 row created.
    SQL> insert into t1 values(2,null);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> alter table t1 drop constraint t1_pk;
    Table altered.
    SQL> alter table t1 add constraint t1_pk primary key (c1,c2);
    alter table t1 add constraint t1_pk primary key (c1,c2)
    ERROR at line 1:
    ORA-01449: column contains NULL values; cannot alter to NOT NULL
    SQL> update t1 set c2 = 3;
    2 rows updated.
    SQL> alter table t1 add constraint t1_pk primary key (c1,c2);
    Table altered.
    SQL> desc t1
    Name                                      Null?    Type
    C1                                        NOT NULL NUMBER(3)
    C2                                        NOT NULL NUMBER(3)Rgds.

  • UPdation is very slow

    Updation in a one table of our database is very slow. How i identify which thing is causing problem.
    Any idea ????
    Thanks

    The tkprof shows that the main problem is due to too much parsing and is two-fold:
    1) you are parsing every statement again and again. They are 1019 soft parses and 932 hard parses. By using bind variables you make sure you are not hard parsing every time, under normal circumstances. In your case however you have a second problem:
    2) the cursor gets invalidated almost half of the times, and a new hard parse had to take place 932 times.
    For the first problem you have to look at the application that is executing the SQL. The application is doing:
    parse
    bind
    execute
    close
    parse
    bind
    execute
    close
    instead of
    parse
    ->bind
    ->execute
    ->bind
    ->execute
    close.
    It may be because of dynamic SQL inside PL/SQL or maybe the parameter session_cached_cursors is set to 0? Or a java application that parses too much?
    The cause of the second problem is hard to tell. What are you doing that makes the cursors go invalid each time? There are numerous ways why this may happen. Maybe you are dynamically granting privileges on the fly? Or are you flushing the shared_pool? At least something non regular is happening here and you have to find out why.
    Note that another problem is the row by row processing, but that will be an issue once the bigger one has been solved
    Regards,
    Rob.

  • Problem in enabling constraint - after disabling and truncation of table .

    Hello Friends,
    I have a table called DRR_TABLES that has list of table names . The requirement is to truncate the tables present in DRR_TABLES except KEY_IDS table and table_name like '%TYPE%' table.
    written a procedure . successfullly truncating the tables from DRR_TABLES but while enabling constraints after truncation , I am getting problem in enabling constraints .
    ERROR at line 1:
    ORA-02270: no matching unique or primary key for this column-list
    ORA-06512: at "schema123.TRUNCATE_DRR_TABLES ", line 49
    ORA-06512: at line 1
    Heres is the code .
    PROCEDURE TRUNCATE_DRR_TABLES is
    x varchar2(200);
    v_tablecount number := 0;
    cursor c is select TABLE_NAME from DRR_TABLES where population_source='PUBLISHING' and TABLE_NAME != 'KEY_IDS' and TABLE_NAME NOT LIKE '%TYPE%';
    BEGIN
    DBMS_OUTPUT.PUT_LINE (' TRUNCATING DRR TABLES ...........');
    OPEN c ;
    LOOP
    FETCH c INTO x ;
    EXIT WHEN c%NOTFOUND;
    for c1 in (select table_name, constraint_name from user_constraints where TABLE_NAME = x and status ='ENABLED' ORDER BY CONSTRAINT_TYPE DESC )
    loop
    begin
    execute immediate ('alter table '||c1.table_name||' disable constraint '||c1.constraint_name|| ' cascade');
    NULL;
    end;
    end loop;
    EXECUTE IMMEDIATE 'TRUNCATE TABLE ' || x ;
    v_tablecount := v_tablecount + 1 ;
    DBMS_OUTPUT.PUT_LINE('TABLE TRUNCATED :'|| x );
    END LOOP ;
    DBMS_OUTPUT.PUT_LINE (' TOTAL TABLES TRUNCATED ' || v_tablecount );
    CLOSE c;
    OPEN c ;
    LOOP
    FETCH c INTO x ;
    EXIT WHEN c%NOTFOUND;
    for c2 in (select table_name, constraint_name from user_constraints where TABLE_NAME = x and status = 'DISABLED' ORDER BY CONSTRAINT_TYPE)
    loop
    begin
    execute immediate ('alter table '||c2.table_name||' enable constraint '||c2.constraint_name);
    NULL;
    end;
    end loop;
    END LOOP ;
    CLOSE c ;
    END TRUNCATE_DRR_TABLES ;
    LINE 49 is the line corresponding to enable constraint statement.
    Edited by: kumar73 on 3 Sep, 2012 11:44 PM

    It is such a pity that a user having 321 posts till date is unaware of basics of Posting a Question.
    1. You need to provide us with your Oracle version
    select * from v$version;2. You need to understand and get accustomed to using tags before and after Code or SQL's for better readability.
    3. You need to provide us with the Table Structure and the Constraints Definition.
    There are many things that looks like Bad Coding practices:
    <font face="Times New Roman" size=2>
    1. Avoid RBAR (Loops).
    2. Implement Bulk Collect.
    3. Why do you need to disable the constraints before truncating? Are you kind of handling the Referential Integrity Constraints?
    4. Duplicate checking of Disabled Constraints.
    5. When the procedure is being executed at Production Environment, are you going to Monitor the DBMS_OUTPUT? Why not Log the Statements into a LOG Table?
    6. Why use a TableCount variable? Would the TableCount Variable be not equal to the Number of Records returned by Cursor C?
    7. What is the need to use a NULL statement after every Execute Immediate?
    8. What is the Need to surround each execute Immediate with Begin .. End block?
    9. Where is your Exception handling Block? Forgot to write?
    </font>
    What has been your effort in finding which Constraint/Table is causing you the trouble?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Adding a new column to a big table is very slow

    All,
    I am trying to add a column to a table with defaul value as 0. The table has about 15M rows. The alter table statement is extermely slow.
    I am using 11.1.0.7 on windows.
    Thanks in advance

    Please be careful when using this new 11g feature that can add columns to tables without updating each row. If you use a default value on a new not null column, update triggers that reference that column's :new value could have problems. There is a bug that has been around for at least 3 years that Oracle claims is "not a bug" that could cause problems in your triggers.
    The issue is that triggers will still see null for the :new.column value even though it has a not null default. Even though you can select from the table and the results will show the default value, which it pulls from the data dictionary, the trigger cannot handle it. It appears to pull the value from the data block, not the data dictionary. So if it has never been updated, those two values will be out of synch. The fix, shown below, it to update each row.
    For example, in 11.2.0.2:
    1. Create a new table, insert one row, and add a new column (not null, with default value):
    create table t (c1 number, c2 number);
    insert into t values (1,1);
    alter table t add (c3 number default 0 not null);Select from it and everything looks fine. The value for C3 is 0, my default. Perfect.
    SQL> select * from t;
            C1         C2         C3
             1          1          0My new column C3 looks fine. Even though that row was never updated, my query pulled the default value of 0 from the data dictionary. Great!
    But now add a simple trigger:
    create or replace trigger t_bur_tr
    before update on t for each row
    begin
      :new.c3 := :new.c3;
    end;
    /I am updating C1, one of my original columns. The trigger looks at the new value of C3 anyway, but because I am not updating it, it should equal its existing value. But this is what I get:
    SQL> update t set c1 = 9999 where c1 = 1;
    update t set c1 = 9999 where c1 = 1
    ORA-01407: cannot update ("AMARTIN"."T"."C3") to NULL
    SQL> The workaround is to update every row. (Defeating the purpose of the cool new 11g feature that can supposedly add columns without updating each row.)
    SQL> update t set c3 = c3;
    1 row updated
    SQL> commit;
    Commit complete
    SQL> select * from t;
            C1         C2         C3
             1          1          0
    SQL> update t set c1 = 9999 where c1 = 1;
    1 row updated
    SQL> select * from t;
            C1         C2         C3
          9999          1          0 Now it works as expected.
    Just a heads-up on this unexpected feature. Not a bug? Sure looks like one to me.
    Edit: Appears to be fixed in 11.2.0.3

  • Pages gets very slow when working on a long table in a document

    Hello!
    I'm working with a table in pages09. it goes over pages. as soon as i want to write some text in the different fields, or, worse, CHANGE text in the fields, pages gets very very very slow.
    why? what can i do?
    i tried the wrap/unwrap-function, but it has no influence.besides, if it's not wrapped in the text, i cannot see the whoe table.
    do i make some mistake?
    thanks for answers, greetings from zürich
    kolibri

    The code used to drive tables is quite the same than the one used by Numbers.
    It is slow in Numbers so, it's logically slow in Pages.
    Yvan KOENIG (from FRANCE mardi 24 mars 2009 20:48:40)

  • Oracle table insertion is very slow - Very Imp

    I have a oracle 9i db installed on Windows 2000 Adv. Server. Server is single processor ,2GB RAM.
    and I have a table is have one long raw field & 4 other fields. It contails 10k records. and table is indexed.
    I have an application is VB using ADOs I connected to Oracle db. I am saving binary file to long raw field. For me retreival is very fast and when i am inserting the record it is very slow. It is taking 4min for one record.
    Please help me to solve this issue

    Is it possible for your capture the execution plan, as well as session wait events?
    If you have buffer busy waits, and not using ASSM (Automatic Segemtn Storage Management), playing with free list also helps.
    Jaffar

  • TDE Table encryption SQL Query performance is very very slow

    Hi,
    We have done one column encryption for one table using TDE method with no salt option and it got impact the response time of sql query to 32 hours.
    Oracle database version is 10.2.0.5
    Example like
    alter table abc modify (numberx encrypt no salt);
    after encryption the SQL execution taking more time and below are the statement for the same.
    ================================
    declare fNumber cardx.numberx%TYPE;
    fCount integer :=0;
    fserno cardx.serno%TYPE;
    fcaccserno cardx.caccserno%TYPE;
    ftrxnfeeprofserno cardx.trxnfeeprofserno%TYPE;
    fstfinancial cardx.stfinancial%TYPE;
    fexpirydate cardx.expirydate%TYPE;
    fpreviousexpirydate cardx.previousexpirydate%TYPE;
    fexpirydatestatus cardx.expirydatestatus%TYPE;
    fblockeddate cardx.blockeddate%TYPE;
    fproduct cardx.product%TYPE;
    faccstmtsummaryind cardx.accstmtsummaryind%TYPE;
    finstitution_id cardx.institution_id%TYPE;
    fdefaultaccounttype cardx.defaultaccounttype%TYPE;
    flanguagecode cardx.languagecode%TYPE;
    froute integer;
    begin for i in (select c.numberx from cardx c where c.stgeneral='NORM')
    loop select c.serno, c.caccserno, c.trxnfeeprofserno, c.stfinancial, c.expirydate, c.previousexpirydate, c.expirydatestatus, c.blockeddate, c.product, c.accstmtsummaryind, c.institution_id, c.defaultaccounttype, c.languagecode, (select count(*) from caccountrouting ar where ar.cardxserno=c.serno and ar.rtrxntype=ISS_REWARDS.GetRewardTrxnTypeserno) into fserno, fcaccserno, ftrxnfeeprofserno, fstfinancial, fexpirydate, fpreviousexpirydate, fexpirydatestatus, fblockeddate, fproduct, faccstmtsummaryind, finstitution_id, fdefaultaccounttype, flanguagecode, froute from cardx c where c.numberx=i.numberx; fCount := fCount+1; end loop; dbms_output.put_line(fCount); end;
    ===============================
    Any help would be great appreciate
    Thanks,
    Mohammed.
    Edited by: Mohammed Yousuf on Oct 7, 2011 12:47 PM

    Still, that's not enough evidence to prove that TDE is indeed the culprit. Can you trace the query before and after enabling the TDE using 10046 and post it here.
    Aman....

  • Select very slow on empty table

    Oracle 9.2.0.5.0
    I had a table with ~1m rows. I truncated it. I then analysed the table and all it's indexes. After that a select * from table was taking ~10secs but the table was empty. Our DBA fixed the problem but I am intriged in what he did. Any ideas?
    Thanks

    As requested, the table script:
    CREATE TABLE "AcEvent"
    "EventId" INTEGER NOT NULL,
    "EventTimestamp" DATE NOT NULL,
    "SystemComponentId" INTEGER NOT NULL,
    "UserName" VARCHAR2(50 BYTE) NOT NULL,
    "EventTypeCode" INTEGER NOT NULL,
    "StartTimestamp" DATE NOT NULL,
    "EndTimestamp" DATE NOT NULL,
    "StatusCode" INTEGER NOT NULL,
    "ServiceTypeCode" INTEGER NOT NULL
    TABLESPACE ACTUATE_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    NOMONITORING;
    CREATE INDEX ACEVENT_IDX_01 ON "AcEvent"
    ("EventId", "SystemComponentId", "StatusCode", "ServiceTypeCode", "EventTypeCode",
    "EventTimestamp", UPPER(DECODE("UserName",'-',NULL,"UserName")))
    LOGGING
    TABLESPACE ACTUATE_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE INDEX "AcEv_SyCoId_Idx" ON "AcEvent"
    ("SystemComponentId")
    LOGGING
    TABLESPACE ACTUATE_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL
    COMPRESS 1;
    CREATE INDEX "AcEv_StCo_Idx" ON "AcEvent"
    ("StatusCode")
    LOGGING
    TABLESPACE ACTUATE_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL
    COMPRESS 1;
    CREATE INDEX "AcEv_EvTi_Idx" ON "AcEvent"
    ("EventTimestamp")
    LOGGING
    TABLESPACE ACTUATE_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE INDEX "AcEv_UsNa_Idx" ON "AcEvent"
    ("UserName")
    LOGGING
    TABLESPACE ACTUATE_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL
    COMPRESS 1;
    CREATE INDEX "AcEv_EvTyCo_Idx" ON "AcEvent"
    ("EventTypeCode")
    LOGGING
    TABLESPACE ACTUATE_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL
    COMPRESS 1;
    CREATE INDEX "AcEv_SyTyCo_Idx" ON "AcEvent"
    ("ServiceTypeCode")
    LOGGING
    TABLESPACE ACTUATE_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL
    COMPRESS 1;
    ALTER TABLE "AcEvent" ADD (
    CONSTRAINT "AcEv_EvId_Idx"
    PRIMARY KEY
    ("EventId"));
    ALTER TABLE "AcEvent" ADD (
    FOREIGN KEY ("SystemComponentId")
    REFERENCES "AcSystemComponent" ("SystemComponentId"));
    ALTER TABLE "AcEvent" ADD (
    FOREIGN KEY ("EventTypeCode")
    REFERENCES "AcEventType" ("EventTypeCode"));
    ALTER TABLE "AcEvent" ADD (
    FOREIGN KEY ("StatusCode")
    REFERENCES "AcStatus" ("StatusCode"));
    ALTER TABLE "AcEvent" ADD (
    FOREIGN KEY ("ServiceTypeCode")
    REFERENCES "AcServiceType" ("ServiceTypeCode"));

Maybe you are looking for

  • ODBC problems with Oracle 8.1.5 on Windows 2000

    Hi, I have got a problem when i configure ODBC on Windows 2000. When I test the driver with ODBC test driver, the programs doesn't respond when i use Oracle ODBC Driver first but responds when I use Microsoft Driver For Oracle first and then Oracle O

  • How to build dynamic query strings in the query using DB adapter 'Pure SQL'

    Dear Forum, I am building an application which will access DB to fetch some result set. The query involves retrieving data from multiple tables(nearly 10 tables). So I have created a DB adapter using 'execute pure sql' option. With this query works f

  • Why are my pics blurry

    Why are my pics that I take on my iPad blurry is there anything I can do to fix that

  • HOW TO CHECK THE CHECKBOX VALUE WITH SQLCE DATABASE

    Hai All,    Good Day! I am using VB in Visual Studio 2008. I have a form with check boxes and one button control. If i selected the check box and then click the button, check the database table field and check box text are equal. if both are equal th

  • Why won't bookmarks stay alpha sorted?

    I have installed and am using the new(est)/current Firefox. I cannot get my bookmards to stay in the order (alpha/name) I choose. They always revert. I have checked the FAQs and nothing on there applies (no add-on, extension, or sync to cause it).