Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Index

Author  Topic 

carumuga
Posting Yak Master

174 Posts

Posted - 2008-09-26 : 02:31:22
Hi,

I have a column Country and City. On anyone one of the column i should create a index to improve the performance of the query.
Which column should i choose for optimum perf.

Your suggestion is highly appreciated.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-26 : 02:35:04
That depends on which column will be used mostly by your queries for searching the information and which columns information will be retrieved mostly. You need to determine how your queries uses the two columns and then decide which one to put index on.Creating an index on a column does not mean that it will be used by query engine. Only if it feels that information requested can be optimally accessed using index information, then index will be used.
Go to Top of Page
   

- Advertisement -