Click here to Skip to main content
15,887,363 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Guys
I am looking for an understanding or an alogorithm that gives the orders of the columns in Missing Index Suggestion in SQL Server 2008/2012.
If any one knows is there any alogrithm that SQL Server uses for it?.
Need some deep information on this as i m working on a part where there order of columns is very critical.
Posted
Comments
shadyrocks08 1-Jan-14 6:20am    
Okie i do get your point, but the thing is that i need to know the process or the algorithm on how does SQL Server suggests the order in missing index suggestion because I would be creating Indexes based on the columns in "where" conditions of query , so basically would collect that info from the query , get a lit of highest columns getting selected and then would dynamically create a NC IX where i have to keep the columns in some particular order.As far by my research on this only "frequently occuring columns in where condition" doesnt come into play , along with that the data type and the column size also does come into account.Correct me if i am wrong somewhere but this is exactly what i am looking for .Any thoughts on this?

1 solution

If order matters, you need a way to sort them. if you don't, order is not guaranteed, because sets do not have an order.

If there's no way to sort them, then the order is random and has no reason to be critical.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900