Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating index on table

User910243567Jan 22 2017 — edited Mar 8 2017

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.

This post has been answered by Nimish Garg on Jan 23 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 20 2017
Added on Jan 22 2017
7 comments
1,054 views