Insert query taking time to load the data into a table in Oracle

1.1k Views Asked by At

I am trying to insert into a table, having one primary key, using a select query. The select query pulls the data from different tables based on some business criteria. But, when we are trying to load the data using this select query, the insert process is taking more than 20min. However, there are no issues with the select query, the select query fetches the data in 2sec and data being loaded into target table is truncate and load.

This is what am trying basically:

insert into TAB_A 
from 
    (select 
     col1,
     col2,
     substr(col3,1,4),
     substr(col4,1,-1) 
     from A 
     inner join B 
         on A.x = B.x
    )

Appreciate your valuable inputs to remove this bottleneck.

Dex.

0

There are 0 best solutions below