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 |
Peace2007
Posting Yak Master
239 Posts |
Posted - 2009-02-22 : 03:22:46
|
Hi, 1. our server needs to be index tuned but it's too slow to run profiler. so I've queried DMVs a few times a few days and got different results about missing indexes (each lists different result for missing indexes) I now doubt which one to apply?2. If we define a PK on a table and don't create any clustered index on it, an index is automatically created on PK, as u know. However, it's better to have, for example, index on (last name, first name) instead of employee_ID (which is PK). I'd like to know if I should delete the index on employee_ID and then create index on (last name, first name) or let the two index remain on the table. 3. As I know, it's better to create index on columns that comes after Groupby and order by. If we create index on such columns, does it still use tempdb for sorting? or the index provides the required space for that? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-22 : 13:17:12
|
quote: If we create index on such columns, does it still use tempdb for sorting? or the index provides the required space for that?
By Default,It doesn't. You can set Sort in TempDB option to ON if your tempDB files are on separate disk. |
 |
|
|
|
|
|
|