October 15, 2012 at 9:45 am
Why is order of the index important when we create a composite index? Could someone explain this with an example, please?
October 15, 2012 at 10:28 am
sunny.tjk (10/15/2012)
Why is order of the index important when we create a composite index? Could someone explain this with an example, please?
http://msdn.microsoft.com/en-us/library/ms181154%28v=sql.105%29.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
October 15, 2012 at 10:29 am
http://sqlinthewild.co.za/index.php/2009/01/19/index-columns-selectivity-and-equality-predicates/
http://sqlinthewild.co.za/index.php/2009/02/06/index-columns-selectivity-and-inequality-predicates/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 15, 2012 at 12:45 pm
GilaMonster (10/15/2012)
http://sqlinthewild.co.za/index.php/2009/01/19/index-columns-selectivity-and-equality-predicates/http://sqlinthewild.co.za/index.php/2009/02/06/index-columns-selectivity-and-inequality-predicates/
Thanks Gail.
If space isn't the issue, can I create separate NC indexes than creating a composite index?
October 15, 2012 at 2:04 pm
http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 15, 2012 at 2:23 pm
GilaMonster (10/15/2012)
http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/
Gail,
I still have a question :-).
If I create a single index on Col A, Col B and Col C , but will this index be useful if I've something like this in my WHERE clause:
WHERE Col B = @b-2
October 15, 2012 at 2:56 pm
sunny.tjk (10/15/2012)
GilaMonster (10/15/2012)
http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/Gail,
I still have a question :-).
If I create a single index on Col A, Col B and Col C , but will this index be useful if I've something like this in my WHERE clause:
WHERE Col B = @b-2
Gail,
I did some testing-- I've a single index built on Col a and Col B, but it's doing a Clustered index scan when I just included Col B in the Where clause of my query.
Various queries run on our reporting server involving various columns in the WHERE clause(as per customer needs).
October 15, 2012 at 3:02 pm
sunny.tjk (10/15/2012)
GilaMonster (10/15/2012)
http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/Gail,
I still have a question :-).
If I create a single index on Col A, Col B and Col C , but will this index be useful if I've something like this in my WHERE clause:
WHERE Col B = @b-2
Go read the first link I posted.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply