My simple update query takes too long to execute. There're around 10m records- out of those I'm executing for 1k records only.
Statement is like this:
UPDATE tab
SET col1= 'yes',
col2 = 'yes'
WHERE col7 ||'_'|| col8 = 'VAL_0'
AND col10 = 'NA'
This statement takes around 70mins to execute.
I've also created the index on col7 ||'_'|| col8
this.
Although it takes this amount of time.
EDIT: Here 'VAL_0' is coming from other resultset(data-table)
Is there any suggestions so I can make my query faster to run. I tried using indexes on (col10) and on (col7 ||'_'|| col8
), but it takes hell lot of time to execute.
other tuning techniques you suggest?
Thanks