SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


ALTER


ALTER

Author
Message
SanjayAttray
SanjayAttray
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5689 Visits: 1619
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 trumpHehe. And that too not without testing and a through input of performance documented.

SQL DBA.
Sankar Reddy
Sankar Reddy
SSC Eights!
SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)

Group: General Forum Members
Points: 850 Visits: 1250
@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/
Rose Bud
Rose Bud
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1787 Visits: 1062
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.
webrunner
webrunner
SSCertifiable
SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)

Group: General Forum Members
Points: 7866 Visits: 4000
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

-------------------
"I love spending twice as long and working twice as hard to get half as much done!" – Nobody ever.
Ref.: http://www.adminarsenal.com/admin-arsenal-blog/powershell-how-to-write-your-first-powershell-script

"Operator! Give me the number for 911!" - Homer Simpson

"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
Sankar Reddy
Sankar Reddy
SSC Eights!
SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)

Group: General Forum Members
Points: 850 Visits: 1250
@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/
michael.kaufmann
michael.kaufmann
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1577 Visits: 1082
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.
mtassin
mtassin
SSCertifiable
SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)

Group: General Forum Members
Points: 7234 Visits: 72521
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
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)

Group: General Forum Members
Points: 66341 Visits: 18570
Thanks for the Question.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

gary.mazzone
gary.mazzone
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2824 Visits: 699
Good post. Always good to learn something new in the QoD
webrunner
webrunner
SSCertifiable
SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)

Group: General Forum Members
Points: 7866 Visits: 4000
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

-------------------
"I love spending twice as long and working twice as hard to get half as much done!" – Nobody ever.
Ref.: http://www.adminarsenal.com/admin-arsenal-blog/powershell-how-to-write-your-first-powershell-script

"Operator! Give me the number for 911!" - Homer Simpson

"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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search