|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Friday, March 15, 2013 2:43 PM
Points: 3,924,
Visits: 1,554
|
|
As the DBA was on vacation ................ Huh. No way. My manager would give me a call to make changes no matter if I am sitting in Taj trump . And that too not without testing and a through input of performance documented.
SQL DBA.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: 2 days ago @ 2:59 PM
Points: 382,
Visits: 1,104
|
|
@Mike Dougherty, @wware, @SanjayAttray
Is it mentioned anywhere in QoD that this change is going to be deployed to production while the DBA is on vacation?
I don’t think I ever mentioned that part, (IMO) it is irrelevant to the QoD.
This question is NOT about performance also, and is phrased in such a way that if you follow the question clearly then you can eliminate the other possibilities and arrive at the right answer easily. This is just my opinion.
However, have you choosed the right answer because you know the concept behind the NULL bitmap in data pages vs Non-Clustered indexes? The intent of this question is to share that information about the difference between them.
If at-least few people realize they learnt something new (about NULL bitmap concept) then this QoD has served its purpose.
Thank You.
Sankar Reddy | http://SankarReddy.com/
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:42 AM
Points: 1,072,
Visits: 1,026
|
|
Only teasing...enjoyed the back-story! Didn't mean to distract from your main point.
Definitely learned something about NULL bitmaps. Your explanation was top-notch. By "performance" I was referring to speed of the alter statement, as you did in your answer choices.
My apologies if offense was taken by well-intended, light-hearted comments.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 2:10 PM
Points: 2,117,
Visits: 2,211
|
|
Great question. I got it wrong, but at least I learned that the two options, though ostensibly only slightly different from each other, have very different results. I need to study the NULL bitmap in more detail.
Thanks, webrunner
------------------- "The chemistry must be respected." - Walter White
"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'" Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: 2 days ago @ 2:59 PM
Points: 382,
Visits: 1,104
|
|
@wware,
I didn’t see anything offensive in anyone’s reply so far nor was I offended in anyway. So, there is absolutely no need to apologize here.
Criticism is good and if taken the right way, will help to write better and unambiguous content. I definitely got what I wanted from this QoD and hopefully will comeback with more in the near future.
Sankar Reddy | http://SankarReddy.com/
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, February 06, 2013 11:51 PM
Points: 1,263,
Visits: 1,079
|
|
My gutt told me to go for option 1, but not because of it running faster, but because I wondered why one would change a non-nullable column to nullable (especially when it holds the login name).
Put these considerations aside (as this wasn't where the QotD was aiming), and being under the impression that the null bitmap is always present, picked option 5...
Lesson learned--thank you very much.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 5:01 AM
Points: 3,226,
Visits: 64,254
|
|
michael.kaufmann (7/14/2010) My gutt told me to go for option 1, but not because of it running faster, but because I wondered why one would change a non-nullable column to nullable (especially when it holds the login name).
That's why I went with Option 1. The Business had already determined that the LOGIN column must be non nullable. While I'm on vacation I don't expect my guys to make these kinds of changes, but even if they did, replacing a NOT NULL column with a NULLABLE one would incur more wrath than they'd ever want to run into.
--Mark Tassin MCITP - SQL Server DBA Proud member of the Anti-RBAR alliance. For help with Performance click this link For tips on how to post your problems
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Monday, May 20, 2013 1:07 PM
Points: 18,733,
Visits: 12,332
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 12:05 PM
Points: 1,539,
Visits: 462
|
|
| Good post. Always good to learn something new in the QoD
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 2:10 PM
Points: 2,117,
Visits: 2,211
|
|
mtassin (7/14/2010)
michael.kaufmann (7/14/2010) My gutt told me to go for option 1, but not because of it running faster, but because I wondered why one would change a non-nullable column to nullable (especially when it holds the login name).
That's why I went with Option 1. The Business had already determined that the LOGIN column must be non nullable. While I'm on vacation I don't expect my guys to make these kinds of changes, but even if they did, replacing a NOT NULL column with a NULLABLE one would incur more wrath than they'd ever want to run into.
I waffled over whether leaving the NOT NULL out (Option 2) would cause the column to be changed to nullable, or whether it would be ignored and leave the column with its current setting (NOT NULL). I guess I now know what would happen - the column would change to nullable unless one explicitly specified NOT NULL in the ALTER statement.
As they say, I learn something new every day. Unfortunately, I am falling behind because I NEED to learn 2-5 new things every day. 
- webrunner
------------------- "The chemistry must be respected." - Walter White
"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'" Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
|
|
|
|