Disable indexes before imp

I am importing large tables from a dmp file created by the exp utility. I would like to disable indexes on these tables for the time of import. I tried "alter index ... unusable", but then the imp utility complains, displays the error message that an index is unusable and doesn't do the import.
Do I have to drop indexes? Then my understanding is that I would have to save the SQL statements to recreate these indexes, correct? Or is there a better solution to speed up the import? Some tables have 40 million records.

Does the table (and it's indexes) pre-exist before running the import ?
If you are on 10g and above, the instance parameter SKIP_UNUSABLE_INDEXES should default to TRUE and should allow Insert with all Indexes (other than PK and Unique) as UNUSABLE. PK and UNIQUE Indexes have to be dropped before the import.
You can generate the CREATE INDEX statements by running imp with the indexfile option. This allows you to generate a script file that has the CREATE INDEX statements.
imp user/password file=export.dmp indexfile=CREATE_INDEXES.sqlHemant K Chitale
Edited by: Hemant K Chitale on Feb 1, 2011 10:11 PM

Similar Messages

  • Disabling Indexes

    Hi,
    in 10g R2,
    it is said that the following WHERE clause will disable index :
    WHERE ''|| column >=valueBut when I use it the explain plan does not change :
    SQL> EXPLAIN PLAN FOR
      2  select EMPLID, NAME FROM sysadm.PS_NAMES WHERE EMPLID >= 'PA001';
    Explained.
    SQL> SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());
    PLAN_TABLE_OUTPUT
    Plan hash value: 170795870
    | Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time
    |
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT     |          |   164 |  5576 |    71   (2)| 00:00:01
    |
    |*  1 |  INDEX FAST FULL SCAN| PS0NAMES |   164 |  5576 |    71   (2)| 00:00:01
    |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter("EMPLID">='PA001')
    13 rows selected.And with that trick :
    SQL>  EXPLAIN PLAN FOR
      2   select EMPLID, NAME FROM sysadm.PS_NAMES WHERE ''||EMPLID >= 'PA001';
    Explained.
    SQL> SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());
    PLAN_TABLE_OUTPUT
    Plan hash value: 170795870
    | Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time
    |
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT     |          |   164 |  5576 |    71   (2)| 00:00:01
    |
    |*  1 |  INDEX FAST FULL SCAN| PS0NAMES |   164 |  5576 |    71   (2)| 00:00:01
    |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter(''||"EMPLID">='PA001')
    13 rows selected.Where am I wrong ?
    Thank you.

    The reason why it does not work for you is, I suspect, because you have an index on all the columns you use in your query. In that one instance, there is absolutely no need to look in the table at all as all the information is available in the index.
    Judging from your explain plans, that is exactly what is happening in your case (there is no Table lookup once the index has been accessed, you see!).
    Eg:
    SQL> create table test1 (col1 number,
      2                      col2 varchar2(20),
      3                      col3 number,
      4                      col4 number,
      5                      col5 number,
      6                      constraint test1_pk primary key (col1));
    Table created.
    SQL>              
    SQL> insert into test1
      2  select level, 'name_'||level, level, level + 1, level + 2
      3  from dual
      4  connect by level <= 10000;
    10000 rows created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> create index test1_idx on test1 (col1, col2);
    Index created.
    SQL>
    SQL> explain plan for
      2  select col1, col2
      3  from   test1
      4  where  col2 >= ''||'name_9990';
    Explained.
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1755968961
    | Id  | Operation        | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |           |    10 |   250 |   100  (53)| 00:00:01 |
    |*  1 |  INDEX FULL SCAN | TEST1_IDX |    10 |   250 |   100  (53)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("COL2">='name_9990')
           filter("COL2">='name_9990')
    Note
       - dynamic sampling used for this statement
    18 rows selected.
    SQL>
    SQL> explain plan for
      2  select col1, col2
      3  from   test1
      4  where  col2 >= ''||'name_9990';
    Explained.
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1755968961
    | Id  | Operation        | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |           |    10 |   250 |   100  (53)| 00:00:01 |
    |*  1 |  INDEX FULL SCAN | TEST1_IDX |    10 |   250 |   100  (53)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("COL2">='name_9990')
           filter("COL2">='name_9990')
    Note
       - dynamic sampling used for this statement
    18 rows selected.
    SQL>
    SQL> explain plan for
      2  select col1, col2
      3  from   test1
      4  where  col3 >= 9990;
    Explained.
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT                                                              
    Plan hash value: 3852271815                
    | Id  | Operation         | Name  | Rows  | Bytes | Cost (%CPU)| Time     |    
    |   0 | SELECT STATEMENT  |       |    11 |   418 |   152  (35)| 00:00:01 |    
    |*  1 |  TABLE ACCESS FULL| TEST1 |    11 |   418 |   152  (35)| 00:00:01 |    
    Predicate Information (identified by operation id):                            
       1 - filter("COL3">=9990)                                                    
    Note                                                                           
       - dynamic sampling used for this statement                                  
    17 rows selected.
    SQL>
    SQL> drop table test1;
    Table dropped.

  • Disable Spotlight before installing a large software update?

    Is it a good idea to "disable" both Time Machine and especially Spotlight before downloading any large software update?  And then enable again after the install?
    This question is based on what I have read on various threads.  Would like to know both the "pros" and "cons".
    Thanks

    Not sure where you read that but it is false. There is no need to disable anything before doing any "Updates".
    It is always a good idea to do a Time Machine backup before you do any major updates and Especially when doing UpGrades so you can Roll back to that TM backup if the "UPGRADE" fails or causes problems.

  • Can you delete ODS indexes before loading each time in Process Chain

    Can you delete ODS indexes before loading eachin time in Process Chain and rebuild them just like a cube.And do you have to delete the indexes if its a daily refresh where data is deleted and a full update is done everyday.

    Hi,
    Are you using Secondary Indices on the ODS objects. I thought the Primary Index (which is also the Key Part of the ODS) is automatically updated during the Data Activation in the ODS. I am not sure if the Secondary Indicies are also automatically updated by the system.
    Naga

  • Enabling Disabled Index

    Hi, while loading data through SQL*loader using DIRECT path, the index on the table gets disabled if the data was bad. I am deleting the bad data from the table. Now I want to get the disabled indexes on that table and re-enable them. how to do this?

    Hmm...
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>create table ttest
      2      (
      3        a_no number(4) not null,
      4        constraints ck_ano primary key(a_no)
      5      );
    Table created.
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>
    satyaki>select index_name
      2     from user_indexes
      3     where table_name = upper('ttest');
    INDEX_NAME
    CK_ANO
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>alter index ck_ano unusable;
    Index altered.
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>select status, index_name
      2     from user_indexes
      3     where table_name = upper('ttest');
    STATUS   INDEX_NAME
    UNUSABLE CK_ANO
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>alter index CK_ANO rebuild;
    Index altered.
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>select status, index_name
      2  from user_indexes
      3  where table_name = upper('ttest');
    STATUS   INDEX_NAME
    VALID    CK_ANO
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>Regards.
    Satyaki De.

  • How to disable indexing in ANY USB drive not specific from privacy in spotlight menu

    Hi all,
    I would like to disable from indexing "ANY" usb device that i connect to my macbook pro.
    I know the option from spotlight -> privacy and exlude a hdd or usb device with the + sign.
    But i want to have something for any external device i can't do this on any device i connect each time.
    During the day i may connect 40-60 usb devices so thats is imposible.
    I want a solution that prevent the spotlight to insexing any external device any usb any hdd without to do it manualy each time.
    Every day i have to test different devices and drives i can to this it's slow down my work.
    I would like a script or solution that will be permantly and for not specific device but for all.
    Thank you
    xireland

    I have not customized anything. All my other browsers are fine, it is only Firefox that has this issue and it's on 2 different pc's.
    I have tried using the default theme and even downloaded, enabled, & disabled 3-4 other themes and none of them effect the transparency or the blacked out tabs.

  • How to disable index defined on a stsndard table j_1ipart2?

    Dear Friends,
    I am using a stndard table j_1ipart2 for updating line items for GL account.I am using a hashed type internal table for this purpose.But There is already two indexes defined. and they are not useful to me.So I just want to disable these indexes for my hashed type internal table for better perfomance.Plz guide me urgenty.
    Also if possible send me sample coding structure...............!!!!!
    For better understanding problem write to me
    Thanks&Regards
    Ricky

    Hi Ricky,
    You dont have to bother about the index selection.The database optimizer will select the best index for your selection.
    Reward Points if helpful,
    Regards,
    jinesh.

  • Disabling Indexing for a DSL

    Hi All,
    My model base is huge(lots of xtext resources), it also contains generated files which are once again xtext files. So when i do a clean build, is there a way that i can ignore indexing of some xtext resources.
    For Ex :
    I have .a, .b, .c, .d files in my project
    .a and .b are used for code generation, whereas .c and .d are generated(But they are also xtext DSL) . So is there a way to stop indexing for .c and .d files.
    Also, May i should need to reenable them when i require ?(Just curious about this )
    Thanks Guys

    Hi
    Why?
    Surely it only makes indexing, and lookups using the index useless? But
    that was the point of disabling in the first place.
    Regards
    Ed Willink
    On 11/08/2015 16:54, Christian Dietrich wrote:
    > Btw completely disabling makes your dsl useless

  • Need to disable Norton before access to Internet permitted

    Hey there,
    I am trying to add a HP dv6000 to my wireless network and when trying to just give it access thru my AP wirelessly I dont have access unless I actually disable NORTON INTERNET SECURITY 2007 (even when wired to AP).  After disabling it I have access to Internet, even if i reenable NORTON INTERNET SECURITY I still have good access untill I reboot. 
    As this is not my computer this method of access to the internet is not feasible and just plain annoying.  I have permited Internet Explorer (all that is on this comp atm) in the personal firewall and still I have to disable to access Internet.
    Any help on how to resolve this would be much appreciated as I'm banging my head on the wall now. 
    There is a broadcom 802.11 b/g wlan adapter in here connecting to WRT54GS V.4 w/ upgraded f/w.
    Thanks in advanced.

    This is a norton problem. You should ask the norton support for help. I think there was something similar here a few days ago where someone had to allow traffic for the protocol driver in his software firewall to get connected.
    Regarding your problem: you are not totally clear whether or not you are able to connect to your wireless network or not. Is the problem that you have a connection established with your router (i.e. the laptop gets its IP address from the router) and you are unable to access the internet then or is the problem that you actually cannot connect to the wireless network at all unless you turn off the firewall?
    Are you using wireless security (WPA2, WPA, WEP)? Which one?

  • Disable failover before changing config

    hi
    I'm making some major changes to the config on an active/standby asa this evening and am planning the roll back in case things go bad.
    I'm planning to wr mem the config and then 'no failover' on the Active asa
    THen make the changes.
    If all goes well, hopefully i can re-enable failover and sync the configs with 'failover' on the Active asa  ? And the wr mem the config.
    If all goes bad, i can 'reload' the Active and it should reload the the old config and it can 'failover' to re-enable the clustering.
    Am i correct in these commands? Will 'failover' re-enable or actually failover!
    Also should i be doing these on the Active or Standby asa.
    thanks
    phil  

    Hello Philbe,
    The thing is that as long as you take out the no failover active, the other ASA (standby) will claim to be the active and this one (ex-active) as do not have any failover config will be forwarding traffic so you might get havving network problems as both of the firewalls will be claiming to have the same IP address but different MAC addresses.
    If you want to follow this path you will need to disable failover on the secondary unit first and then on the primary and make the changes (you will miss the failover functionality but at least you will not cause any network outage).
    For me the best way to go is to do it while having the network with failover, make sure you have a backup of the config and a console connection to the firewall so you can inmediatly go back to the previous setup.
    Looking for some Networking Assistance? 
    Contact me directly at [email protected]
    I will fix your problem ASAP.
    Cheers,
    Julio Carvajal Segura
    http://laguiadelnetworking.com

  • Disabling indexing except home directory

    The indexing of spotlight takes so long, so I wanted to enable the indexing path only to the home directory. I edited the _rules.plist as below and ran the command.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dt
    d">
    <plist version="1.0">
    <dict>
    <key>EXCLUDE</key>
    <array>/</array>
    <key>INCLUDE</key>
    <array>~/</array>
    <key>NOTE</key>
    <string>Specify paths to include or exclude, preceeding rules which target user-homes with ~/</strin
    g>
    </dict>
    </plist>
    % mdutil -i off /pathtovolume
    % mdutil -E /pathtovolume
    % mdutil -i on /pathtovolume
    The result was, excluding for every path under root path didn't seem to work. My assumption is that the path is not crawled recursively.
    My question is,
    1. Is there a way to write path to be crawled recursively?
    2. If there aren't a way to crawl recursively, do I have to write every path to exclude for doing such thing?
    PowerBook G4   Mac OS X (10.4.4)  

    Hi, K. O. Welcome to the Discussions.
    By default, Spotlight does not index much outside your Home directory, unless you have multiple users defined on your Mac, in which case it also indexes their Home directories and the other locations documented in "Mac OS X 10.4: Where does Spotlight search?".
    Since most of the data on your PowerBook (unless you also have external drives connected) resides in your Home directory, there's little you can do about this other than exclude (via Privacy) subdirectories of your Home directory that you do not want to search with Spotlight.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • Installer created via Deployment Utility - disable uninstall before install?

    With an Installer created by the TestStand 3.1 Deployment Utility, when the Installer executes it always has to first uninstall any deployed files that are on the target system.  If I wanted to disable this feature and have the Installer just always overwrite existing files is there a way to do so?

    Hi Snood1,
    I was able to reproduce that message on my end here and unfortunately could not find a way to prevent that message or auto-uninstall.  I tried using the command prompt, but could not get a silent uninstall to occur.  I did however try it out on both TestStand 3.5 and 4.0 and each of these versions recognized that I was upgrading my deployment and installed over the old system with the new versions of the files.  The only thing I know to recommend here is an upgrade of the version of TestStand if you want to prevent this message.  If needed, click here for product information.
    Best of luck!
    Chris R.
    Applications Engineer
    National Instruments

  • How do I disable cookies before visiting a particular web site and reinstate them after the visit?

    I am using Firefox 6.0.2 on an Apple Mac running OS 10.5.8. I want to discover how the site I am visiting behaves when it is accessed by a stranger.

    You could visit the site in [[Private Browsing|Private Browsing mode]] .
    The site will not have access to any cookies that were set outside of Private Browsing - it will be as if you are visiting for the first time. Any cookies the site makes will be lost when exiting Private Browsing.

  • How to customize a LKM,IKM

    Hi Experts,
    Can any one help me how to customize LKM and IKM knowledge modules.
    Please give me your brief explanation on this..
    Thx,
    Sahadeva.

    A very common enhancement done to IKM is to add a step to gather stats after the loading.
    I also use to replace the code of the truncate step to call a stored procedure instead of the truncate DDL (for privileges purpose).
    Some of my IKMs have extra steps to disable indexes before loading and to rebuild it afterwards.
    You can also build totally new KMs to do partition exchange instead of standard insert for example. Or if you have a complicated specific Slowly Changing Dimension implementation.
    Basically, you can customize/add/remove all the steps. The KM is the place where you choose HOW to extract/integrate data, where the interface defines the WHAT (which source, which target, which filters, expressions, joins, ...). So if you have a technical requirement, there is a lot a chance that it will take place in the KM. If this is a business requirement, it's probably in the interface mapping.
    Hope it helps.
    Regards,
    JeromeFr

  • ODS Index- Enable and disable?

    is it possible to create a proccess that disable the index before the load and enable it after the load in an ods?
    as is done in a cube through a process chain.
    thanks
    Alexandre

    Hi...........
    Just now I hav answered a similar type of question..........
    Indexing is only possible for Database and infocube............By default primary index are create for ODS.........For secondary index........u hav to go to SE11 >> ODS active table >>From menu choose indexes
    ODS table is nothing but a flat table..........and indexing can be done just like a database table........now u can achieve this by using ABAP.........u can tahe help of ABAP people......
    Check this...
    http://help.sap.com/saphelp_erp2004/helpdata/en/cf/21eb47446011d189700000e8322d00/frameset.htm
    Check this similar thread............
    https://www.sdn.sap.com/irj/scn/forums
    Regards,
    Debjani.........

Maybe you are looking for

  • All I still get is a blank other than the side bars with stuff in them when I go to Itunes store. What's with that? is anyone else having this issue?

    All I still get is blank other than the side bars with information like previous purchases and all. But I can't buy or preview anything. I've done the winsock reset and all but that hasn't helped. I checked my firewall and that hasn't done anything e

  • Automatically create table definitions

    Is there a utility or tool that will automatically take an XML document and create a table or object type in the database without having to manually doing it? --JM                                                                                       

  • Exception handling Proxy to SOAP

    Hello All, I am working on proxy to soap scenario. it is synchronus scenario, i want to handle the errors coming from like we pass response in soartm. but structure do not have soartm. Is there any idea how to handle the errors like suppose the syste

  • Problem with pvkimprt.exe

    Hi. I'm having trouble getting pvkimprt.exe to import my .spc and .pvk file. After I enter the password in the password dialog box, it errors out with: Error: 000004c0, The format of the specified password is invalid. I know the password is correct,

  • [svn] 609: Changed the svn:mime-type of the SDK's milestones.html file.

    Revision: 609 Author: [email protected] Date: 2008-02-21 14:47:48 -0800 (Thu, 21 Feb 2008) Log Message: Changed the svn:mime-type of the SDK's milestones.html file. Property Changed: flex/sdk/milestones.html