|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Saturday, June 23, 2012 10:54 AM
Points: 8,
Visits: 23
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:21 PM
Points: 4,
Visits: 90
|
|
Enjoying the series. Looking forward to the rest of them. Hurry hurry lol.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Saturday, June 23, 2012 10:54 AM
Points: 8,
Visits: 23
|
|
Am dancing as fast as I can.
Hope to have it all into Kalen (the editor) shortly.
Dave.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, January 31, 2013 2:56 PM
Points: 3,
Visits: 51
|
|
| Thank you very much! Finally finished going through all 10 steps little by little and been worth every second! Looking forward to the rest of the them.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 10:47 AM
Points: 37,729,
Visits: 29,990
|
|
Just one correction:
Non-leaf level entries contain only index key columns and the pointer to a lower level page. Included columns only exist in the leaf level entries; they are not carried in the non-leaf level entries.
Non-leaf entries of a nonclustered index contain the index key columns, a pointer to the page below and, if the index has not been declared as unique, it will also contain the clustered index key or RID (depending whether the base table is a heap or clustered index). This ensures that there are never complete duplicate rows in the upper level of a nonclustered index
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Wednesday, January 16, 2013 4:23 PM
Points: 415,
Visits: 2,333
|
|
GilaMonster (1/20/2012)
Just one correction: Non-leaf level entries contain only index key columns and the pointer to a lower level page. Included columns only exist in the leaf level entries; they are not carried in the non-leaf level entries. Non-leaf entries of a nonclustered index contain the index key columns, a pointer to the page below and, if the index has not been declared as unique, it will also contain the clustered index key or RID (depending whether the base table is a heap or clustered index). This ensures that there are never complete duplicate rows in the upper level of a nonclustered index
Interesting! Whats the downside of having duplicate rows in nonleaf nodes? Aren't they still going to point to the correct child nodes that they're the parent of?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 10:47 AM
Points: 37,729,
Visits: 29,990
|
|
patrickmcginnis59 (1/20/2012) Whats the downside of having duplicate rows in nonleaf nodes? Aren't they still going to point to the correct child nodes that they're the parent of?
Yes, they will, however it can be more work when modifying or deleting the rows. Imagine an index on gender and a row is deleted. That row needs to be located in the nonclustered index to be removed (from the leaf). If all we had at the intermediate levels was the gender, SQL would have to scan half the index to find the row that it needs to remove. If the index rows are unique (from the clustered key or RID), SQL can just navigate straight to the row it need to remove. http://technet.microsoft.com/en-us/sqlserver/gg508878.aspx (about 24 minutes in)
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Wednesday, January 16, 2013 4:23 PM
Points: 415,
Visits: 2,333
|
|
GilaMonster (1/20/2012)
patrickmcginnis59 (1/20/2012) Whats the downside of having duplicate rows in nonleaf nodes? Aren't they still going to point to the correct child nodes that they're the parent of?Yes, they will, however it can be more work when modifying or deleting the rows. Imagine an index on gender and a row is deleted. That row needs to be located in the nonclustered index to be removed (from the leaf). If all we had at the intermediate levels was the gender, SQL would have to scan half the index to find the row that it needs to remove. If the index rows are unique (from the clustered key or RID), SQL can just navigate straight to the row it need to remove. http://technet.microsoft.com/en-us/sqlserver/gg508878.aspx (about 24 minutes in)
Thanks! I didn't even consider deletes. I'll have to buy some popcorn and watch the movie!
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 10:47 AM
Points: 37,729,
Visits: 29,990
|
|
patrickmcginnis59 (1/20/2012) Thanks! I didn't even consider deletes. I'll have to buy some popcorn and watch the movie!
Not a movie. One of the MCM videos. That particular one is about 40 minutes long and all about index internals
p.s. not just deletes, any modification that has to change the data in the index leaf
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 5:30 AM
Points: 861,
Visits: 1,436
|
|
There's just so much information in the this article and discussion! Please keep up the good work.
Many books don't expose the level of detail presented here and leave us wondering how that really works from the inside.
Thank you very much David (and Gail for the additional info and link).
Best regards,
Andre Guerreiro Neto
Database Analyst http://www.softplan.com.br MCITPx1/MCTSx2
|
|
|
|