February 12, 2017 at 2:31 pm
Hello all,
I noticed that there is 2 ways to create non cluster index
1) Regular
2) with include
What is the difference between Non cluster index and non cluster index with include
And when di ee use each option?
Thaks in advance!
February 12, 2017 at 2:46 pm
89netanel - Sunday, February 12, 2017 2:31 PMHello all,I noticed that there is 2 ways to create non cluster index1) Regular2) with includeWhat is the difference between Non cluster index and non cluster index with includeAnd when di ee use each option?Thaks in advance!
They're both nonclustered indexes. They both have the key values in the B-tree. The leaf level contains all the key values. The difference is that when you have included columns, they're added to the leaf level. Including columns makes your index consume more space, but can cover queries that need to return the included columns.
Gail has an article (one of a series of 3) that covers nonclustered indexes at http://www.sqlservercentral.com/articles/Indexing/68636/.
February 12, 2017 at 6:56 pm
89netanel - Sunday, February 12, 2017 2:31 PMWhat is the difference between Non cluster index and non cluster index with includeAnd when di ee use each option?Thaks in advance!
Let's ask the horse! 😉
https://msdn.microsoft.com/en-US/library/bb522682.aspx
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2017 at 6:33 am
Jeff Moden - Sunday, February 12, 2017 6:56 PM89netanel - Sunday, February 12, 2017 2:31 PMWhat is the difference between Non cluster index and non cluster index with includeAnd when di ee use each option?Thaks in advance!Let's ask the horse! 😉
https://msdn.microsoft.com/en-US/library/bb522682.aspx
Looks like a broken link - That page's title says:
ALTER DATABASE
SET Options (Transact-SQL)
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
February 13, 2017 at 11:33 am
Hi Ed,
This is a great link!
This paragraph in the article helped me a lot:
"
Typically columns that appear only in the select clause of a query and not within the WHERE, FROM or GROUP BY are candidates for INCLUDE columns.
"
Thank you very much for your assistance!!!
February 13, 2017 at 12:18 pm
89netanel - Monday, February 13, 2017 11:33 AMHi Ed,This is a great link!This paragraph in the article helped me a lot:"Typically columns that appear only in the select clause of a query and not within the WHERE, FROM or GROUP BY are candidates for INCLUDE columns."Thank you very much for your assistance!!!
No problem. Thanks for the feedback.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply