Hello All,
I am a newbie in performance tuning. I am facing following issue:
1. I have main table with around 300K records, this table has no constraints or indexes (client is reluctant to add any).
2. I have staging table which receives around 10-15K records every 3 hours and I have to insert and/or update these in main table.
3. I can not use MERGE as they have data issues and client is not ready to change the data so I have to modify the logic from MERGE to Insert-Update.
4. I tried following ways but both took more than 60 minutes.
Update main_table m
set (column list) = (select column_list from staging s where m.id = s.id) ;
Update main_table m
set (column list) = (select column_list from staging s where m.id = s.id) where exists (select 1 from staging s where s.id = m.id); /* Added exists clause to get records present in staging table only */
I am on Oracle 12.1.0.2
Can you please help me to get out of this?