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

Nooby index question

$
0
0

When I have two indexes on the same table with the following keys:

 

INDEX1: ARTIFACT_TYPE_ID, ARTIFACT_ID

INDEX2: ARTIFACT_TYPE_ID, PROJECT_ID

 

Wouldn’t it be better instead of these 2 indexes have 1 index with the following keys ? 

 

INDEX1: ARTIFACT_TYPE_ID, ARTIFACT_ID, PROJECT_ID

Or will this have a negativ impact when the query looks only for "ARTIFACT_TYPE_ID = , andPROJECT_ID = ) or (ARTIFACT_TYPE_ID = andARTIFACT_ID = )

Thanks for your help


Viewing all articles
Browse latest Browse all 7129

Trending Articles



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