To improve a insert SQL
We have a insert SQL that we want to know if there is a way to improve the query. The SQL has a unique index constraint on the insert. Here is the the SQL:
insert
/*+ append */
into cust_ship_to_loc
(
cust_ship_to_loc_sqn,
sys_cde,
eff_start_date,
rec_srce,
cust_ship_to_sqn,
loc_sqn,
proc_isrt_date
)
select intgn_sqn.nextval,
s.sys_cde,
i_eff_start_date,
k_vu_cust_ship_to_source,
s.cust_ship_to_sqn,
--nvl(l.loc_sqn, -1),
nvl(l.loc_sqn, get_missing_loc(i_systems(i) .sys_cde)),