• Questions 1 and 5 do not have enough details to provide an answer. I would be asking for a lot of clarity about what those mean. 2, 3 and 4 are not questions that have an answer. They are intended to start a discussion about how to do those things. This is more of a role playing technique than anything else. If you can discuss a number of things you would do that is what they are after. Of all of those I find the "how do you optimize a procedure" to be the most outlandish of them all. The interviewer wants to see if you know that the question is loaded. There is not a formula for this. It is more of an art than a science. Optimizing queries takes the culmination of all your knowledge in one location. Even worse is that you might optimize a query today and in a year you go back and realize a number of improvements you could make because you have learned new things.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/