Reputation: 315
Data for a page in my application is loaded from several tables by joining them on the primary keys. Few tables are joined on non primary keys. Apart from this there are lots of conditions in the where clause on the non primary keys.
So defining indexes on the non primary key columns used in where clause will have a performance benefit ?
Although the non primary key columns values are not unique but most of the values are repetitive
Upvotes: 0
Views: 114
Reputation: 1269823
The general answer to your rather vague question is "yes". One of the main purposes of indexes is to improve performance of comparisons in where
clauses.
There are many situations where indexes will not help; but for simple comparison operations, they should speed the operations.
Upvotes: 1