Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

union index

$
0
0

I am creating a table to track games in a tournament. aside from other data, there will be the fields: home_team and away_team.

a common query will be show all games played by team A. they can either be in the field home_team or away_team so the query will look like where home_team=team A OR away_team=team A. I could use a union instead of the or.

what would be the best way to index the table and to optimize these queries? 

thanx

 

???


Viewing all articles
Browse latest Browse all 12963

Trending Articles



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