EXPort/Import can be Very Slow with OPTIMIZER_MODE = FIRST_ROWS http://metalink.Oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=181072.1
3。修改初始化参数OPTIMIZER_MODE = CHOOSE, 创建登录触发器,只有当应用用户登录的时候才设置优化模式 CREATE OR REPLACE TRIGGER LoginTrigger AFTER LOGON ON ETFDB.SCHEMA BEGIN execute immediate 'alter session set OPTIMIZER_GOAL=FIRST_ROWS'; END; /
4。exp使用专门的用户EXPIMPADMIN,该用户具有EXP_FULL_DATABASE和IMP_FULL_DATABASE 角色。然后创建触发器 CREATE OR REPLACE TRIGGER LoginTrigger AFTER LOGON ON EXPIMPADMIN.SCHEMA BEGIN execute immediate 'alter session set OPTIMIZER_GOAL=CHOOSE'; END; /