Predefined transformations for drop/create index?

Hi,
I want to add pre/postmap transformations for dropping/recreating indexes in the target table, for performance reasons.
I can't find any predefined transformations for this (such as WB_DISABLE/ENABLE_ALL_CONSTRAINTS for constraints). It seems I have to program this myself (dynamic PL/SQL for reuse with other tables seems the logical choice), but it seems such a dumb oversight - has Oracle really not supplied predefined transformations for this? It must be an extremely common need in ETL?
Regards,
Kai Quale
University of Oslo

On further thought, one needs more information than the table name to (re)create an index. (That's actually one of my pet peeves against Oracle - that you can't enable/disable indexes in the same way as constraints.)
Offhand, the only solution I see is to store index metainformation in a separate table, write custom procedures for disabling FKs/dropping indexes and enabling FKs/creating indexes, using the metatable.
It is a pretty common task in data warehousing - disable FK/drop index => run mapping => enable FK/create index. How do people do this in OWB?
Regards,
Kai

Similar Messages

  • REBUILD INDEX vs DROP/CREATE INDEX

    Hi there,
    Does anyone has already got some performance degradation after REBUILD INDEXes ? Would it be better to perform DROP/CREATE INDEX instead ?
    Thank you very much for anu reply.
    Best regards,
    Helena

    Hi,
    >>so is it then better to DROP/CREATE them ?
    Well, In fact I learned that when you rebuild an index, Oracle creates a new index from the old index and does not perform sorting while building the new index, which results in performance enhancement. In this case, depending of the size of your data it's necessary sufficient space on a tablespace for storing the old as well as the new index (while creating the new index). Other advantage, is that Oracle can use the old index for answering queries while it builds the new index too using [alter index <index_name> rebuild online].
    Cheers

  • Dropping/Creating index for an individual partition on a partitioned table.

    Hi,
    I wanted to know how to create and drop index for a single individual partition on a partitioned table.
    Thanks..

    You are not allowed to create an index on a single partition. All the table, mean all the partitiones must be indexed. You can create local or global indexes on partitioned tables. Local indexes ,imho, are easier maintained. For more info refer to documentation http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5010.htm#i2062403
    Also, index partitions are maintained through corresponding table partitions. For example, if a table partition is truncated or is dropped, the corresponding index partition is also truncated or dropped (in case of locally partitioned indexes of course). In case of globally partitioned indexes, you will have to rebuild the index each time you truncate or drop a table partition.

  • Simple Transformation for XML created by Excel

    Hello,
    Excel can produce XML files quite easily in this documented format:
    http://msdn.microsoft.com/en-us/library/aa140062(office.10).aspx
    (in excel: file --> save as and choose XML)
    Does someone has an idea of how I can read this XML using a Simple Transformation in ABAP?
    Example: if this is an excel sheet with 3 columns and 3 lines
    ¦----
    ¦
    ¦ PERNR          ¦ BEGDA            ¦ ANZHL ¦
    ¦----
    ¦
    ¦   12346          ¦  20.02.2009          ¦15                    ¦
    ¦----
    ¦
    ¦   2356           ¦  25.02.2009          ¦12                    ¦
    ¦----
    ¦
    this is the XML
    The goal would be to transform this XML into an internal table. Any idea is appreciated.
    Koen Van Loocke

    Hi Keon,
    Please find the below link
    [Help|http://help.sap.com/abapdocu/en/ABAPCALL_TRANSFORMATION.htm]
    [Help|http://help.sap.com/abapdocu/en/ABENABAP_ST.htm]
    Please find the code below
    [Code|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/exportingdatatoExcel-XMLtotherescue]
    Thanks
    Kalyan

  • CREATE INDEX WITH DUPLICATE COLUMN NAME

    Hi,
    i need to interface our application with an Orale Bridge to CREATE INDEX with duplcate column Name.
    For Example
    CREATE index NLOT_FOURNLOT_idx ON NLOT(FOURNISSEUR ,NOLOT ,FOURNISSEUR ,NOBLFOUNISSEUR,NOLIGNEBL ,NOLOT ,QTECOLISRECUES ,CODENONQUALITE ,QTECOLISACCEPTE);
    CREATE table NLOT(
    FOURNISSEUR VARCHAR2(09)
    ,NOBLFOURNISSEUR VARCHAR2(13)
    ,NOLIGNEBL VARCHAR2(03)
    ,NOLOT VARCHAR2(20)
    ,QTECOLISRECUES VARCHAR2(10)
    ,CODENONQUALITE VARCHAR2(02)
    ,QTECOLISACCEPTE VARCHAR2(10)
    ,NOMBREDECOLISRE VARCHAR2(10)
    ,NOMBREDECOLISAC VARCHAR2(10)
    ,FILLER VARCHAR2(1)
    ,FILLE1 VARCHAR2(1)
    ,TYPEREFERENCE VARCHAR2(01)
    ,REFERENC1 VARCHAR2(15)
    ,CONTROLERECEPTI VARCHAR2(01)
    ,DATEDEPEREMPTIO VARCHAR2(8)
    ,CONTROLEPROCHAI VARCHAR2(1)
    Thanks
    Philippe

    Well, you can't do it. ORA-957 is one of those irrevocable errors for which the solution is to remove the duplicate name from the SQL statement.
    But, anyway, why do you want to do this? I would guess there's no performance benefit from having the same column indexed twice (of course it's impossible to test this, so it's just my opinion).
    Cheers, APC

  • ORA-01591 and ORA-00054 while creating index

    Hi guys,
    there is a situation that I didnt understand.
    I have table and want to create an index on it but when I try to create an index I got one of
    ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
    or
    ORA-01591: lock held by in-doubt distributed transaction 11.13.689049 errors.
    as I know there is and .net application which has connection pooling and while this web services were active, I can not create index.
    first thing that i did is querying V$LOCK table and i saw some TM locks from time to time and sometimes nothing. when there wasn't any locks on the table I try to create index, system wait for a while (1 minutes approximately) then I got "ORA-01591: lock held by in-doubt distributed ..." error again. (even "Application" wait event occured. in enterprise manager I saw a few red sql command which is waiting for my create index command)
    after a quick search, I use PENDING_TRANS$ and PENDING_SESSIONS$ tables to force rollback to the transaction which is indicated on ORA-01591 error but just after I rollback that transaction, a new one come up every time.
    today I use something else. First I locked table manually in EXCLUSIVE mode (and success it). then I try to create index again, command worked for a while and I got ORA-01591 error again.
    any idea why is this happining and how can i create my index ?

    sybrand_b,
    when i run
    Lock Table MyTable in exclusive mode;command, it succeeded. I can lock the table if you mean that or if you are saying even if that command runs very well, because of in doubt transaction, oracle will take the lock back, that could be. but as i said lock table command succeeded.
    and there is an another situation here, there is no any other database ? I mean, how could an in doubt transaction happen. there are dblinks but they do not even query that table.
    there is just something that i dont know. as i said in my first message, a .net application is running on an aplication server, as far as i know there connection pooling etc on that server. is this can cause that kind of in doubt transaction ?
    PS: every time in ora-01591 error, I got the same transaction id and that transaction id is not in dba_2pc_pending or pending_session$ etc. that might help.
    Edited by: Mustafa KALAYCI on 17.Şub.2012 13:48

  • Performance issue with drop and re-create index

    My database table has about 2 million records. The index in the table was not optmized, so we created a new index lets call it index2. So this table now was the original index (index1) and the index2. We then inserted data into this table from the other box. It was running for a few weeks.
    Suddenly we noticed that a query which used to take a few seconds now took more than a minute. The execution plan was using the index2 which technically should be faster. We checked if the statistics were upto date and it was. So then we dropped the new index, re-ran the query and it completed in 10 sec's. It was usign the old index. This puzzled me since the point of the index2 was to make it better. So then we re-created index2 and genrated stats for the index. Re-ran the query and it completed in 5 sec's.
    Everytime we timed to run the query, I shutdown and restarted the box to clear all cache's. So all the time I have specified are pure time's and not cached. The execution plan using index2 taking 1 min and 5 sec's are nearly the same, with very minior difference in cost and cardnitality. Any ideas why index2 took 1 min before and after drop and create again takes only 5 sec.
    The reason I want to find the cause is to ensure that this doesn't happen again, since its impossible for me to re-create the index everytime I see this issue. Any thoughts would be helpful.

    Firstly the indexes are different index1 is only on the time column, where as index2 is a composite index consisting of 3 columns.
    Here are the details. The test that I did were last friday, 3/31. Yesterday and today when I executed the same query I get more increased times, yesterday it took 9 sec amd today 17 sec. The stats job kicked in on both days and is upto date. This table, nothing gets deleted. Only added.
    3/31
    Original
    Elapsed: 00:01:02.17
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=6553 Card=9240 Bytes
    =203280)
    1 0 SORT (UNIQUE) (Cost=6553 Card=9240 Bytes=203280)
    2 1 INDEX (FULL SCAN) OF 'EVENT_NA_TIME_ETYPE' (NON-UNIQ
    UE) (Cost=15982 Card=2306303 Bytes=50738666)
    drop index EVENT_NA_TIME_ETYPE
    Elapsed: 00:00:11.91
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=7792 Card=9275 Bytes
    =204050)
    1 0 SORT (UNIQUE) (Cost=7792 Card=9275 Bytes=204050)
    2 1 TABLE ACCESS (BY INDEX ROWID) OF 'EVENT' (Cost=2092
    Card=2284254 Bytes=50253588)
    3 2 INDEX (RANGE SCAN) OF 'EVENT_TIME_NDX' (NON-UNIQUE
    ) (Cost=6740 Card=2284254)
    create index EVENT_NA_TIME_ETYPE ON EVENT(NET_ADDRESS,TIME,EVENT_TYPE);
    BEGIN
    SYS.DBMS_STATS.GENERATE_STATS('USER','EVENT_NA_TIME_ETYPE',0);
    end;
    Elapsed: 00:00:05.14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=6345 Card=9275 Bytes
    =204050)
    1 0 SORT (UNIQUE) (Cost=6345 Card=9275 Bytes=204050)
    2 1 INDEX (FULL SCAN) OF 'EVENT_NA_TIME_ETYPE' (NON-UNIQ
    UE) (Cost=12878 Card=2284254 Bytes=50253588)
    4/3
    Elapsed: 00:00:09.70
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=6596 Card=9316 Bytes
    =204952)
    1 0 SORT (UNIQUE) (Cost=6596 Card=9316 Bytes=204952)
    2 1 INDEX (FULL SCAN) OF 'EVENT_NA_TIME_ETYPE' (NON-UNIQ
    UE) (Cost=11696 Card=2409400 Bytes=53006800)
    Statistics
    0 recursive calls
    0 db block gets
    11933 consistent gets
    9676 physical reads
    724 redo size
    467 bytes sent via SQL*Net to client
    503 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    3 rows processed
    4/4
    Elapsed: 00:00:17.99
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=6681 Card=9421 Bytes
    =207262)
    1 0 SORT (UNIQUE) (Cost=6681 Card=9421 Bytes=207262)
    2 1 INDEX (FULL SCAN) OF 'EVENT_NA_TIME_ETYPE' (NON-UNIQ
    UE) (Cost=12110 Card=2433800 Bytes=53543600)
    Statistics
    0 recursive calls
    0 db block gets
    12279 consistent gets
    9423 physical reads
    2608 redo size
    467 bytes sent via SQL*Net to client
    503 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    3 rows processed
    SQL> select index_name,clustering_factor,blevel,leaf_blocks,distinct_keys from u ser_indexes where index_name like 'EVENT%';
    INDEX_NAME CLUSTERING_FACTOR BLEVEL LEAF_BLOCKS DISTINCT_KEYS
    EVENT_NA_TIME_ETYPE 2393170 2 12108 2395545
    EVENT_PK 32640 2 5313 2286158
    EVENT_TIME_NDX 35673 2 7075 2394055

  • Rebuilding Spatial index versus dropping&creating Spatial index.

    System: Oracle Enterprise Edition 10g (10.1.0.4.0)
    When I rebuilding a Spatial Index is the result the same when I am dropping the index and create a new Spatial Index?

    Final result of course will be the same. After rebuild or drop/create you will have the same index.
    Some differences:
    1. Rebuild uses existing index as the source for new index So, during rebuild process index will consume twise as much space.
    2. Rebuild is faster than drop/create
    3. Rebuild with online option guarantee that index will be still available for DML during rebuild
    Andrejus

  • A query related to creating Indexes for a table

    Hi ,
    I am in a J2EE Banking Project using Oracle 10g as our Database .
    We have created Indexes on some tables .
    But this this is not called by any of our Java class .
    Could anybody please let me know how these Indexes will actually improve the Performance .
    Waiting for your replies .
    Thanks in advance .

    But in our safety database (huge & ofcourse Oracle), we use indexes just because to avoid duplicates, improve data retrieval and so on.As you pointed out indexes can do 2 things for you: enforce uniqueness and (hopefully) improve data retrieval. Enforcing uniqueness is pretty basic, but indexes don't always improve performance. Under the wrong condtions indexes can hurt performance. The ideas below refer to B-TREE indexes; other kinds of indexes have other considerations
    Indexes add overhead to insert, delete, and (hopefully not - updating index columns is a Bad Idea), enough so that if you're inserting a lot of rows into a large table it is sometimes helpful to drop the indexes, load the data, and recreate the indexes when done to help performance. The more indexes a table has the more overhead DML statements need to maintain them.
    Indexes help query performance under a couple of conditions. When using them as join keys to retrieve a small percentage of rows in a table (< 20% maybe; there is no firm number) indexes can help. When a query can read its columns from an index only (such as counts against a primary key index) index access can be faster than table access.
    Indexes can hurt performance by adding overhead for maintenance if the index is never actually used or if used to read most of the rows in a table when a full table scan would be more efficient (why go through the extra effort to read the index and then table when you'll have to read most of the rows in the table anyway?).

  • Estimate space for temporary tbl spce while creating index

    my temp tablespace is 32GB and index estimated to be as big as 55GB , do i need more temp space? i.e at least 55GB?
    I am going todo
    CREATE TEMPORARY TABLESPACE ts_tmp
    TEMPFILE 'E:\temp01.dbf' SIZE 10000M
    REUSE AUTOEXTEND ON EXTENT MANAGEMENT LOCAL;
    ALTER USER myuser TEMPORARY TABLESPACE ts_tmp;
    CREATE index...
    ALTER USER myuser TEMPORARY TABLESPACE temp;
    DROP TABLESPACE ts_tmp;
    will i facie any difficulty setting back the temporary tableapace for myuser to temp and dropping the newly created temporary tablespace?
    Edited by: user9198889 on Nov 29, 2011 7:56 AM

    user9198889 wrote:
    my temp tablespace is 32GB and index estimated to be as big as 55GB , do i need more temp space? i.e at least 55GB? yes

  • How to create  index for a column of a view

    Hi,
    I have created view for a table and then i am trying to create index for a column of that view. i am using the query "CREATE INDEX index_name ON view_name (col)". but Mysql is showing error like "view_name is not a base table".
    How can i do that......

    As mentioned this is a java forum not a mysql forum, but as I know the answer - you can't create an index directly on a view in mysql.

  • Not able to create index for organization

    in transaction ses_admin, i created an index for business object BAS_BUPA of type 1,ie individual account.
    However, i am not able to create index for BAS_BUPA of type 2
    It says "No entry in table SIC_INDEX_MAIN for index object BAS_BUPA and index 2"

    hi,
    The index is for Business Partner, so it includes both Persons and Organizations. So, only one index needs to be created for both.
    The functioning is correct, just that i missed it.

  • Error while creating transformation for DSO in SAP BI

    While creating a transformation for DSO in SAP BI, I got an error "Data source xxx (FS_xxx) does not exist in version A". I would like to know what this error is all about and how to resolve this issue.
    Thanks.
    Bhusan

    Hi Bhusan,
    You have to activate your datasoure to make it as an ACTIVE version.
    SO in RSA1>Modelling>Datasouces--> find your datasource name and activate it first.
    Then create your transformation and continue with other steps.
    Hop it helps
    Regards,
    Arun.M.D

  • ABAP Routine for Deleting and creating index for ODS in Process chains

    Any pointers for the ABAP Routine code for deleting and creating index for ODS in Process chains.

    Hi Sachin,
    find the following ABAP code to delete ODS ondex.
    data : v_ods type RSDODSOBJECT.
    move 'ODSname' to v_ods .
    CALL FUNCTION 'RSSM_PROCESS_ODS_DROP_INDEXES'
      EXPORTING
        I_ODS = v_ods.
    To create index:
    data : v_ods type RSDODSOBJECT.
    move 'ODSname' to v_ods .
    CALL FUNCTION 'RSSM_PROCESS_ODS_CREA_INDEXES'
      EXPORTING
        I_ODS = v_ods.
    hope it helps....
    regards,
    Raju

  • How to create index file for pdf.

    Hello,
    I need to create a plugin which will read a list of pdf files and then create a full text index with catalog. I searched on net and came to know about the catalog plugin which does this work.In AV layer there is a catalog object but I am unable to find any example on net which uses the catalog object to create the pdx file and a support folder(contains idx files).
    I also read the java script documentation but there was no example for creating index.We can build index but for that we need to retrieve the index object first.
    Can somebody please giude me.
    Thanks!

    Hi Irosenth,
    Is it possible to use DOM/IAC to create index files. The example given in SDK(SearchPdfVB) allows us to add,remove,enable and disable index files. But there is no method given in example to create an index file.
    I want to create index file and the supporting folder which contains .idx files automatically ie through code. Is it possible to do so??
    I also looked into the AVCommands but couldn't understand how to create the index files using AVCommands.
    Can you please guide me.
    Thanks!!

Maybe you are looking for

  • ISE 1.1.2 failover - Syncronization issue

    Hi everone, Scenário: I've deployed two Cisco ISE 1.1.2 nodes as follows: Node 1 as Primrary Admin, Policy Server and Monitoring Node 2 as Secondary Admin, Policy Server and Monitoring All configured roles works as expected. Problem: Once I promote t

  • Error Message when opening Photoshop CS5: CoreFoundation.dll missing

    Hello... and thank you for your help, I downloaded my upgraded version of CS5 yesterday. I am running Windows 7. I did not have a problem with the download or with accessing it. CS4 is still loaded on my computer. Toady I started copying plugins and

  • JSF Navigation: Unexepcted value for action in h:form tag

    Hi I am running simple JSF application and when I click the button, it stays in the same page rather than the output page. I found that the resulting Html code has form action and that action is referring to current page. here is my JSF code... <%@ p

  • Monitor went out on Toshiba A215-S4767

    Hi I have a new problem I was listening to music last night and my monitor just died on me....at least I assume it's my monitor that died. The music was still playing but my monitor was just black (not black like it's on and black...black like it was

  • Sys.UTL_DBWS issue when calling web service .......

    Hi, Background Details : Linux : 2.6.18-164.10.1.0.1.el5 #1 SMP Fri Jan 8 02:34:10 EST 2010 x86_64 x86_64 x86_64 GNU/Linux Web Server : Apache Tomcat 6.0.20 Database : Oracle 10.2.0.4 Utility that we use to consume the Web Service from PL/SQL : JPubl