I got burned today at a SQL Server Interview!

  • Honesty is something that will be appreciated by the interviewer for sure. We were looking for a DBA here and we got some resumes of Sr DBAs. I consider myself as a Junior Level DBA. I do not have knowledge to consider myself as a senior DBA. So I expect the people I interview have better knowledge than me. And of the 4 I interviewed, none of them pass the Muster. They all claimed to be experts in SQL Server 2000 and 2005. But when you talk to them, you know that they are just trying to bluff their way around.

    -Roy

  • Gail,

    Since you would ask about Statistics in an interview, what can do you look for in an answer? I have been working with MS SQL Server since 1996/1997 (6.5/7.0/2000/2005) and this is one area that is still an enigma to me. I have yet to find a reasonable explaination about the how's, why's, or where for's. I understand that they are used by the optimizer to help select the best query plan, that SQL Server will auto create single column stats (if auto create is on), and the DTA will recommend multi-column stats for some workloads.

    Beyond that, you got me!

    😎

  • Lynn,

    Easiest way for me to explain it is with a bag of marbles... how many red ones do you have? How many white ones do you have? How many blue ones do you have? How many total to you have? Based on the number of red and white marbles, is it easier to count the blue marbles or count the red and white ones to find out how many blue ones you have?

    In other words, it's a histogram to help establish what the cardinality of the column(s) involved are...

    Yeah, it's more complicated than that... but that's the basic idea.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Jeff,

    Okay, sorta helps, but still I'm not quite there. Does that shoot me down from working with you or do I at least understand enough that they are used by SQL and are beneficial.

    Actually, no one has ever asked me about stats in an interview.

    😎

  • Lynn Pettis (2/29/2008)


    Jeff,

    Okay, sorta helps, but still I'm not quite there. Does that shoot me down from working with you or do I at least understand enough that they are used by SQL and are beneficial.

    Actually, no one has ever asked me about stats in an interview.

    😎

    Lynn,

    I think you are ahead of me. My take on stats is that you should have autoupdate on, if a fast query gets slow, check to see if the stats have been updated (I' d have to BOL here to remember where to look) and if not, update them. Also update them after an upgrade or service pack.

  • Jack Corbett (2/29/2008)


    Lynn Pettis (2/29/2008)


    Jeff,

    Okay, sorta helps, but still I'm not quite there. Does that shoot me down from working with you or do I at least understand enough that they are used by SQL and are beneficial.

    Actually, no one has ever asked me about stats in an interview.

    😎

    Lynn,

    I think you are ahead of me. My take on stats is that you should have autoupdate on, if a fast query gets slow, check to see if the stats have been updated (I' d have to BOL here to remember where to look) and if not, update them. Also update them after an upgrade or service pack.

    Jack, I'm just glad to see I'm not alone when it comes to stats.

    😎

  • SQL Server interview questions

    http://vyaskn.tripod.com/iq.htm

    Check how much you could understand (not memorize). They are some basic questions.

  • I s'pose those are OK questions... there isn't a one in there that will help you figure out if you have an SQL Developer on your hands, though.

    And that's part of the rub on this stuff. Everybody makes a trip to the web to find "SQL Interview Questions" or "DBA Interview Questions" and none of them apply to the poor ol' SQL Developer who just wants to let the DBA do his/her thing while (s)he writes some nasty fast T-SQL.

    You don't have to be a good DBA to be a good Developer. And, depending on the type of DBA you are, you don't have to be a good Developer to be a good DBA. If you're a Hybrid DBA, then sure, you need to be a Ninja Developer and a good DBA all rolled into one package.

    Folks, when you do an interview, remember... you're not trying to show off how smart YOU are, you're trying to figure out how smart the other person is for the job you want them for... and they're human... half of them are scared to death and you need to find out if they fit it with the group. Be a human... smile... have a good time and leave the sarcasm at the water cooler. The interview process doesn't need to be a butt kicking contest for anyone. Even the folks that I thought were as dumb as a post and had to occasionally be reminded to breath, were all treated with respect and in a friendly manner.

    Ask the right questions for the job (none of them should be "trick" questions), try not to impress yourself during the interview, and be friendly.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • I wasn't going to post but decided after reading the "everyone wants mid level" note to share a story.

    I was laid off of a job and had minimal TSQL expereience. I had built a couple databases, was primarily a web developer. When I was laid off one of the consulting companies I had intereviewed with had said "we'll keep your resume on file but I would recommend you look into some books on SQL Server. Concentrate on joins". I did exactly as was recommended. Spent 30 bucks I did not have at the time on a book to learn more on TSQL.

    A month later (I was out of work for almost 3 months) I got a call for a company and went to the interview. It was more my asp knowledge (which was limited to about a year. I was previously an access programmer) that got me hired. Everything I know I taught myself or was taught by some outstanding mentors and co-workers. I got lucky and am very thankful the company was willing to take a chance on me.

    My point is this, if you have the drive, take the time to learn, not memorize, what you are interested in. While working through this book I did my own side projects to force myself to learn more. Just reading is not enough. My company hires entry level people. Our HR Recruiter knows what we want in terms of experience and has the knowledge to know a good resume from a bad one. Sure sometimes we get fluffed resume's (quite often actually) and that is why we do phone interviews first. We can pick up fluff generally from the phone interview which also let's us gage personality a little bit. If you got potential, we'll hire you. We've found two great developers that I can think of right now that had very little experience but had great personalities and were driven. Be honest. It will work out much better. Do some sample project, put them on disk and take them with you. Show your code and if there is inherit understanding in the code, you are more likely to be given a chance.

    Good luck and if you are truly interesting in SQL and not in just getting a job, keep studying.

  • Hi,

    The guy asked me:

    What is an index?

    In database design, a list of keys (or keywords), each of which identifies a unique record. Indices make it faster to find specific records and to sort records by the index field -- that is, the field used to identify each record.

    There are mainly two types of indexes: Cluser & Non-Clustered

    What is the difference?

    Clustered Index

    Only 1 allowed per table

    Physically rearranges the data in the table to conform to the index constraints

    For use on columns that are frequently searched for ranges of data

    For use on columns with low selectivity

    Non-Clustered Index

    Up to 249 allowed per table

    Creates a separate list of key values with pointers to the location of the data in the data pages

    For use on columns that are searched for single values

    For use on columns with high selectivity

    A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages. A non-clustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a non-clustered index does not consist of the data pages. Instead, the leaf nodes contain index rows

    He said: Which one is better?

    It depends on the scenario. If you have more selections on the table then go with clustered.

    He said: If you need to do a lot of SELECT, would you use a clustered or non-clustered index? ----- Clustered.

    He said: If you need to do a lot of INSERT, would you use a clustered or non-clustered index? ---> Non-Clustered. Look at the above explanation around clusted & Non-Clustered.

    Thanks -- Vj

    http://dotnetvj.blogspot.com

  • In my interview for my first full time DBA Position, I was bemused with the following; the interviewer, a in-house recruiter from the company where I was applying, said

    "You've applied for a job as a DBA. But I don't see DBA anywhere on this CV."

    I asked for a look at my own CV and pointed out to the clown that there it was, bold as brass, Database Administrator! He then asked me if I didn't think I was too old to join 'his' company! (I was 37 at the time). I did consider walking out here and then, but I was glad I stayed to meet my eventual manager, who thankfully was technical and asked me various questions of the type mentioned in this thread.

    The one I was stumped on was a memory block, but I didn't BS and got the next interview.

    The question was, "What do you check for an error in T-SQL?"

    I said it was a system function, but couldn't remember its name. Duh! I could name the VB Err object, and said it was simliar, and then added "I do know where to look". When asked I told him the BOL. It was this answer that got me the next interview with the IT manager.

    His main concern was whether I had the guts to stand up against the developers and be strong in applying standards and guidelines. In other words, could I shout at people? 😉 I got the job.

    Dave J


    http://glossopian.co.uk/
    "I don't know what I don't know."

  • Jack Corbett (2/29/2008)


    This is when I hate coming to this site, because I'd probably fail in interview with you guys.

    I did say depending on the position. Someone applying for an admin position isn't going to get the questions on indexing or complex optimisation techniques. Someone applying for SQL developer isn't going to get the questions on backups, restores or corruption.

    I'll also vary questions based on the skill level and position been applied for. Someone who's fairly new to SQL and applying for a junior admin will just get asked to name one of the SQL backup types. Someone applying for a senior position and claiming to be an expert will likely get asked to name all three, the differences between them, when you would use them and why...

    I will admit, I'm a nasty interviewer. Some of my colleagues who've sat in on interviews tell me they don't ever want to be the candidate in an interview I'm giving... 😉

    That said, I just marked a technical test for one guy. He got 30%. I'm probably still going to recommend a hire. He's enthusiastic, willing to learn and he knows how to say "I don't know". It'll probably take me a month to fill in the holes in his knowledge, but that's OK.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    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
  • Lynn Pettis (2/29/2008)


    Since you would ask about Statistics in an interview, what can do you look for in an answer? I have been working with MS SQL Server since 1996/1997 (6.5/7.0/2000/2005) and this is one area that is still an enigma to me. I have yet to find a reasonable explaination about the how's, why's, or where for's. I understand that they are used by the optimizer to help select the best query plan, that SQL Server will auto create single column stats (if auto create is on), and the DTA will recommend multi-column stats for some workloads.

    You know a hundred times what anyone I've interviewed knows. Generally I'm trying to see if the person knows that stats exist and what they're used for.

    In a nutshell, they're used by the optimiser to get a quick estimate of the number of rows that will be affected by a particular operation in a query. If in knows that, there's a greater chance that it can find a decent execution plan for the query.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    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
  • GilaMonster (3/2/2008)


    Lynn Pettis (2/29/2008)


    Since you would ask about Statistics in an interview, what can do you look for in an answer? I have been working with MS SQL Server since 1996/1997 (6.5/7.0/2000/2005) and this is one area that is still an enigma to me. I have yet to find a reasonable explaination about the how's, why's, or where for's. I understand that they are used by the optimizer to help select the best query plan, that SQL Server will auto create single column stats (if auto create is on), and the DTA will recommend multi-column stats for some workloads.

    You know a hundred times what anyone I've interviewed knows. Generally I'm trying to see if the person knows that stats exist and what they're used for.

    In a nutshell, they're used by the optimiser to get a quick estimate of the number of rows that will be affected by a particular operation in a query. If in knows that, there's a greater chance that it can find a decent execution plan for the query.

    I appreciate the compliment. Now you've set the bar for me even higher. I would be lucky to put myself at 5 out 10 on scale of 10 in my knowledge of SQL Server. I know there is a lot more to learn from people like you, Jeff, Matt, Steve, et al.

    :blush:

  • Don't sell yourself short, Lynn... your a humble man that knows more than you think. Sounds wierd, but maintain the humility with pride. I would honor the chance to work with you in the heat of battle.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing 15 posts - 31 through 45 (of 357 total)

You must be logged in to reply to this topic. Login to reply