Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

When does the given index fire?

$
0
0

Hi Everyone,

Suppose there is a table Table1 which has three columns which are not primary key

Column1

Column2

Column3

If we create an composite index on the columns Column1,Column2 as Idx_C1_C2, then would the index fire for all the three columns? Is it better to create a joint index or create separate indexes for each of the two cloumns?

Select * from Table1 where column1=value1 and column2=value2

Select * from Table1 where column1=value1

Select * from Table1 where column2=value2

Regards

Gautam


Gautam S



Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>