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.
| Author |
Topic |
|
vladimir_grigoro
Yak Posting Veteran
62 Posts |
Posted - 2002-09-17 : 03:27:40
|
| Hi all,I want to specify for a SELECT statement to use particular index. I have a table with 5 indexes but I want to use just one of them. How to specify that in the SELECT query.Thanks in advance.The Rebel |
|
|
Teroman
Posting Yak Master
115 Posts |
Posted - 2002-09-17 : 05:37:24
|
tryselect *from myTable (index=myIndex)where myField = 'foobar'Best know what you are doing if you use this, SQLServers optimiser may not be the best, but you have to be pretty damn sure you know better.What will happen to the data distribution over time. Is it using another index to avoid doing a bookmark lookup.Go for it if you're sure, but be prepared for it to come back and bite you on the bum if you get it wrong. col |
 |
|
|
|
|
|