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 2008 Forums
 Transact-SQL (2008)
 Index - SQL 2008 choose de best Index ?

Author  Topic 

DANILOPF
Starting Member

3 Posts

Posted - 2011-08-04 : 20:11:11
Hi,

Does SQL 2008 choose te best index to make a select performatic ou should I define this explicit?

Thank you,
Danilo

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-08-04 : 20:20:16
Let the query optimizer select it. There are rare cases where you may have to provide index hints, but this should almost never be done.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-08-04 : 20:20:53
Oh and I am assuming you are asking about index hints. If you are instead asking about SQL creating indexes for you, well that doesn't happen.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

DANILOPF
Starting Member

3 Posts

Posted - 2011-08-04 : 20:26:56
Hi, my question is about the index hints.
Then, I don't need to specify the index clause in the select command, It's that?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-08-04 : 21:52:18
Correct, you should not specify any index hints.
Go to Top of Page
   

- Advertisement -