Interview Questions

  • Gosh... that's just the first part of the interview. 😉 We get into the problem solving stuff once we've determined that they have the proper basic knowledge. I agree that it's good to be a problem solver but, for a senior position, you shouldn't have to look up everything on Google. :sick:

    What you said here is spot on...

    He smiled and responded with, "You're looking at the problem all wrong. Yes, you could eventually come to the answer using referenced materials. What separates those guys from me is speed. While they are referencing, I'm already fixing it."

    --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)

  • xsevensinzx (5/22/2015)


    He smiled and responded with, "You're looking at the problem all wrong. Yes, you could eventually come to the answer using referenced materials. What separates those guys from me is speed. While they are referencing, I'm already fixing it."

    That was an interesting aspect of the MCM lab exam (before MS went and killed it). The lab VM had full Books Online installed on it, and because of the time pressure it was totally useless unless you knew exactly what you were looking for. I remember using it twice to look up syntax of statements that I almost never use

    I can't write PIVOT or UNPIVOT queries without referencing the docs, I don't know the intricacies of the MERGE, I haven't memorised the options on a BACKUP CERTIFICATE, but I know when to use them and where to find the syntax on the rare occasion that I do need to write them.

    That said, technical questions in an interview are a must, they're asked first, nice and early. No, you won't find my questions on an internet site. I ask them to establish a minimum level of knowledge.

    If someone is interviewing for a performance tuning position and he can't tell me at least 1 difference between a clustered and a nonclustered index and he can't name at least 4 operators found in query plans, I'm sure as hell not going to bother putting him in front of a test system with a tuning exercise.

    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
  • Koen Verbeeck (6/6/2014)


    kimberly_lehman (6/6/2014)


    Number 2 is selecting names of employees over 60. Or specifically, people who were 60 years old by the end of last year, since this is only comparing by year. I have no idea which ones provides better performance. In my experience I either haven't worked with large enough data sets that I needed to spend time optimizing queries, or the companies I worked for were large enough that DBAs would handle the optimizing of queries that took too long to run.

    The second one is better for performance. In the first one, an index on DateOfBirth cannot be used, as the column is inside a calculation.

    The second one doesn't have this problem.

    Regarding the remark of Luis saying the results can be different:

    I think this is becausue DATEDIFF(year,date1,date2) isn't exactly accurate. 20131231 and 20140101 gives a 1 year difference, but in reality they are just 1 day apart.

    Actually the second query has a different objective from the first one: the first one finds employees who were 60 by the end of last year, the second finds employees who are over 60 now.

    I would call these questions simple, unless there is a very tight time constraint on answering.

    Tom

Viewing 3 posts - 46 through 47 (of 47 total)

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