Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««12345»»»

ALTER Expand / Collapse
Author
Message
Posted Wednesday, July 14, 2010 1:40 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, April 14, 2014 2:16 PM
Points: 2,812, Visits: 2,543
I had a tough time with this one. I have to do some more reading. Thanks for the question and teh explanation.
Post #952672
Posted Wednesday, July 14, 2010 2:18 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, March 27, 2014 8:50 AM
Points: 2,163, Visits: 2,184
Interesting question, but it seems like it was more of a trick question than anything... The questions says "management wants to change the loginname so that it can accept longer loginnames up to 60 characters and that is the only change requested."

Given that Option 1 is the only option, Option 2 violates what management requested by making the field NULLable as well. So I chose the correct answer not actually thinking about the performance difference, as I didn't see that it was relevant.

Though I did learn a little more about the NULL bitmap, so that is a good thing.
Post #952695
Posted Wednesday, July 14, 2010 2:54 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:24 PM
Points: 5,471, Visits: 23,523
As stated by others:
Good post. Always good to learn something new in the QOD


Thanks for a thought provoking / learning experience keep up the good work.

Sankar Reddy - Looking forward to additional QOD from you


If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #952718
Posted Wednesday, July 14, 2010 3:47 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, August 01, 2012 9:06 PM
Points: 1,165, Visits: 144
Given that option 2 changes the column to allow nulls, and that was not desired, I believe "Option 2 will fail" is the best answer.

-at
Post #952745
Posted Wednesday, July 14, 2010 7:11 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, March 24, 2014 5:16 PM
Points: 382, Visits: 1,136
Going thru the comments, it seems NOT everyone is aware that NOT NULL clause is necessary when altering the column. It’s a simple fact but not everyone knows about that. I am still surprised over ¾ of the people got this incorrectly. I hope at-least few people will know more about NULL bitmap because of this QoD.

Hugo mentioned that I might get some grief over the answer options. I tried to come up with a different set of answer options that are intelligent yet simple and relevant but didn’t make it this time.

I tried to bring a fresh look for the QoD, like a code review instead of just asking a random question. Look at this question as a code review project and not just a random out of the box question.

I have few ideas for the next QoD’s and will try to make them better from the feedback I received here. Thanks for participating in this and sharing the feedback (both good & bad). Appreciate it.




Sankar Reddy | http://SankarReddy.com/
Post #952806
Posted Wednesday, July 14, 2010 10:56 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 2:13 AM
Points: 1,865, Visits: 368
thanks , really nice question...
Post #952846
Posted Thursday, July 15, 2010 2:47 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, February 12, 2014 3:15 AM
Points: 189, Visits: 377
I too learned something new today about something I didn't even know existed (NULL bitmap).

Excellent question.

JR



Inflatable sailors never die, they gently deflate over time.

Post #952924
Posted Thursday, July 15, 2010 11:09 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, January 21, 2014 8:55 AM
Points: 1,520, Visits: 3,035
Sankar Reddy (7/14/2010)
Going thru the comments, it seems NOT everyone is aware that NOT NULL clause is necessary when altering the column. It’s a simple fact but not everyone knows about that. I am still surprised over ¾ of the people got this incorrectly. I hope at-least few people will know more about NULL bitmap because of this QoD........

Count me as one who hadn't realized that an ALTER column statement defaults to making it nullable. While the behind-the-scenes, performance related explanation is appreciated, the primary lesson is to include NOT NULL in the ALTER statement unless you really want to change the column to nullable.

One more thought: Isn't it a shame that when we're doing real-world changes we don't get neatly wrapped multiple-choice questions?
Post #953331
Posted Thursday, July 15, 2010 11:17 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, March 27, 2014 8:50 AM
Points: 2,163, Visits: 2,184
john.arnott (7/15/2010)
[quote]Sankar Reddy (7/14/2010)
One more thought: Isn't it a shame that when we're doing real-world changes we don't get neatly wrapped multiple-choice questions?


Yep, that is one of the things I have said to people when they comment on my high scores on the MCTS and MCITP tests.

When my boss comes to me and says they need something to be setup he doesn't give me five choices with one of them being correct. That would be nice, but not realistic.
Post #953337
Posted Thursday, July 15, 2010 12:10 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, March 24, 2014 5:16 PM
Points: 382, Visits: 1,136
I am glad this QoD has helped people learn new things. The credit should directly go to Hugo Kornelis for his excellent feedback otherwise this would have been an incorrect/ordinary question.

Sankar Reddy | http://SankarReddy.com/
Post #953382
« Prev Topic | Next Topic »

Add to briefcase «««12345»»»

Permissions Expand / Collapse