Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Index on tables

Former Member
0 Kudos

I will be requesting indexes on a table but not sure whether I need to request two seperate or just one index. My WHERE clause has an OR clause for example:

WHERE field1 in ...

OR field2 in ....

Do I need to create one index field1, field2 or do I need two indexes field1 and field2

Thanks

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

I think if you have 2 indexes, one on FIELD1, and the other on FIELD2. then the system will be try to match index access on either index.

If you have only 1 index on FIELD1+FIELD2 then it is not possible that one index can satisfy both predicates in the WHERE clause.

2 REPLIES 2

former_member194669
Active Contributor
0 Kudos

I think if you have 2 indexes, one on FIELD1, and the other on FIELD2. then the system will be try to match index access on either index.

If you have only 1 index on FIELD1+FIELD2 then it is not possible that one index can satisfy both predicates in the WHERE clause.

0 Kudos

Hi,

> I think if you have 2 indexes, one on FIELD1, and the other on FIELD2. then the system will be try to match index access on either index.

>

> If you have only 1 index on FIELD1+FIELD2 then it is not possible that one index can satisfy both predicates in the WHERE clause.

>

> a®s

would you explain what you mean with an example please? It sounds a little bit strange...

Kind regards,

Hermann