We have below table with columns,
Table T1
Columns:
-----------
Col_1, Col_2, Col_3, Col_4, Col_5, Col_6, Col_7, Col_8, Col_9, Col_10, Col_11, Col_12, Col_13, Col_14, Col_15
on which below indexes are created.
XXTEST_Col_1 Col_1
XXTEST_Col_2 Col_2
XXTEST_Col_3 Col_3
XXTEST_Col_5 Col_5
XXTEST_Col_6 Col_6
XXTEST_Col_7 Col_7
XXTEST_Col_8 Col_8
XXTEST_Col_8 (Col_4, Col_10, Col_11)
I have requirement to update table T1 as below and its taking really long.
UPDATE T1
SET Col_3= x_value,
Col_6 = y_value
where Col_4='N'
and Col_3 IS NULL;
To improve performance, created below index and it improved the performance of the update.
New Index: XXTEST_Col_4 (Col_4, Col_3)
My question is it good idea to create the above index with already existing indexes. Is there any other better way to handle this.
Thanks for your time.