sql - Oracle statement hanging -



sql - Oracle statement hanging -

i have quite simple sql statement executed on oracle 10g database. moves info 1 schema another:

create table target.big_table select * source.big_table (column1, column2) in (select column1, column2 target.help_table);

there unique constraint in target.help_table column1 , column2. in source.big_table there combined primary key(column1,column2,column3,column4,column5).

there no problem statement since executed several times while testing on similar testing environment.

however, @ real environment statement didn't had i/o activity after 3 hours. 8 hours later aborted execution.

what can reason behaviour? , can root of problem? don't have clue!

try rid off nested loops in explain plan. consider rewrite query using inner join:

select /*+ use_hash(a b) */ a.* source.big_table inner bring together (select distinct column1, column2 target.help_table) b on b.column1 = a.column1 , b.column2 = a.column2;

also consider utilize use_hash hint. indexes should not used when select rows (except case when column1 , column2 help_table returned index fast total scan). utilize distinct in inner query if there duplications.

consider add together parallel hint.

sql oracle sqlplus

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -