{"id":102397,"date":"2024-05-14T00:00:22","date_gmt":"2024-05-14T00:00:22","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=102397"},"modified":"2024-06-10T14:03:25","modified_gmt":"2024-06-10T14:03:25","slug":"t-sql-tuesday-174-your-favorite-job-interview-question","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/t-sql-tuesday-174-your-favorite-job-interview-question\/","title":{"rendered":"T-SQL Tuesday #174: Your Favorite Job Interview Question?"},"content":{"rendered":"<p>T-SQL Tuesday is something I don&#8217;t participate in nearly enough. When I saw <a href=\"https:\/\/36chambers.wordpress.com\/author\/36chambers\/\">Kevin Feasel&#8217;s<\/a> invitation for this months topic, I knew I had to answer!<\/p>\n<p><a href=\"https:\/\/36chambers.wordpress.com\/2024\/05\/07\/t-sql-tuesday-your-favorite-job-interview-question\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-102398\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2024\/05\/a-blue-and-white-cube-with-a-blue-circle-descript.jpeg\" alt=\"A blue and white cube with a blue circle\n\nDescription automatically generated with medium confidence\" width=\"215\" height=\"215\" \/><\/a> <br \/>\nOne of my favorite things to do is technical interviews (about stuff that I know). So much so that at one time, I had considered trying to start an agency that would screen applicants for their technical skills using SQL Server. If I could do this all day long, I would. (Others mentioned there might be liability and such, so I dropped it. I don\u2019t have interview questions ready for lawyers.)<\/p>\n<p>I just love the whole process though. Tech skills aren\u2019t soft skills. If you know how to write queries, backup databases, and also know a good deal about the internals, I can tell. What I am pretty terrible at telling is if you will be good at applying those skills. I knew people who could sense a slacker, a jerk, or a general faker just talking to them. (A skill that is hard to evaluate until their opinion is overridden!)<\/p>\n<p>But SQL Server (and a bit more of all databases) technical skills are my thing. The hard part is pinpointing the text of the one specific question that was my favorite.<\/p>\n<p><em>Warning: the story you are about to hear is true. The questions have been changed to protect the innocent. <\/em><\/p>\n<h2>My True Favorite Question Varies<\/h2>\n<p>I have often been called a mean interviewer, and not to put too fine a point on it\u2026 I am. The reason is that my favorite interview question is a follow up question to something you got wrong.<\/p>\n<p>It goes like this. \u201cWhat kinds of indexes does SQL Server support?\u201d<\/p>\n<p>Then, the interviewee thinks a bit, and says, \u201cTwo kinds, clustered and nonclustered.\u201d<\/p>\n<p>Now while this is not technically perfectly correct, it is also right in the sense that these are two kinds of indexes. When I wrote the question, I realized that I would probably say the same thing. If the candidate also starts discussing rowstore and columnstore and B-Tree and Hash (in memory), I might move to a different topic feeling like they know their stuff. But since they gave the standard, right off the top of your head answer, I dig in. \u201cHow many of each type of index can you have on a table?\u201d<\/p>\n<p>Now, to be clear, I can\u2019t answer that question to any specific detail myself right off the top of my head, much less in a discussion with multiple people judging my every word. I didn\u2019t how many nonclustered indexes a table supports until I looked it up. I guessed 255, but I was wrong as I dutifully looked it up and it is 999. But here comes my favorite part.<\/p>\n<p>When an interviewee replies with no hesitation and a confident, fearless look on their face, and answer something like \u201c255 clustered indexes and 2 billion non clustered\u201d (or something equally ridiculously wrong), this is where I learn a LOT about the person.<\/p>\n<h2>This is it. My favorite question<\/h2>\n<p><strong><em>My favorite question is the first follow up to a very wrong answer.<\/em><\/strong><\/p>\n<p>How I follow up seems mean. It kind of is. But this is where I learn if they are lying or simply got something wrong. I don\u2019t let on that they are wrong. I just ask a question like the following. Much of the choice will depend on the level of the person we are interviewing:<\/p>\n<ul>\n<li>\u201cTell me how the clustered index is used\u201d<\/li>\n<li>\u201cTell me the structure of a nonclustered index\u201d<\/li>\n<\/ul>\n<p>Or something similar. If they produce an answer that feels like they just got confused. \u201cThe clustered index is often used as the primary key index\u201d, then I will realize they may have made a mistake, and we will discuss it a bit and see if it rings any bells. (You know, when their face stops scrunching up and their eyes looking up and to the left in deep thought.)<\/p>\n<p>Sometimes people will dig in and say, again with confidence, something like \u201cclustered indexes make operations faster than nonclustered indexes, but nonclustered indexes are located on another disk.\u201d At this point, I probably move on to the next topic.<\/p>\n<h3>But that isn\u2019t the end<\/h3>\n<p>I don\u2019t turn off the interview right then, certainly not the first couple of times, because it is entirely possible that they were taught incorrectly. <strong><em>Most<\/em><\/strong> of the time what happens is they realize they were wrong and say \u201cI was wrong wasn\u2019t I? I don\u2019t know this well enough, it isn\u2019t something I do, but I thought I did,\u201d or even better \u201coh yeah, you can only have 1 clustered index\u2026 the data is sorted by it, isn\u2019t it?\u201d<\/p>\n<h2>And there you have it<\/h2>\n<p>That moment is one I am fishing for. This is where you see who they are. And it happens to all of us. There are things we don\u2019t exactly know well enough to spout it out under pressure. It happens to us all. As the interviewer (especially doing remote interviews), I can check out answers and see if they are right. When you are sitting there in a high-pressure spot, you can\u2019t.<\/p>\n<p>Keep in mind that the interviewer may have a set of questions that get progressively harder, including some that it would take a perfect memory to answer. The goal is to get to that point and see how they handle something that the interviewee doesn\u2019t know.<\/p>\n<p>And this is what a lot of people complain about in interviews. \u201cThis is not real life, in real life I have computers. Once I figure it out, I can do great things.\u201d Of course it isn\u2019t real life. Of course you have Google, Bing, ChatGPT, Copilot, etc., etc. But if you have been doing a task before\u2026you should typically remember something of it. That is the purpose of the interview, to confirm that you know what you said you know on your resume. (I will leave that for a future blog post!)<\/p>\n<h2>To guess or not to guess<\/h2>\n<p>I was once not considered for a job many years ago, because during the technical interview, I didn\u2019t say \u201cI don\u2019t know.\u201d I tried to reason out the problem they gave me and did my best to use the knowledge I had and show them I had an idea of what the problem was and how to solve it. I remember responding something like \u201cI am not completely sure, but I think you would\u2026\u201d<\/p>\n<p>The person who I knew that was in the interview said that was the feedback, he guessed too much. I on the other hand, love guessing people when they tell me they are guessing. I won\u2019t drill in on those kinds of wrong answers, I will just see what they are thinking, and it becomes a discussion. They said they weren\u2019t sure, so this is fine. I can see what all they get right and wrong in their answer. This tells me that they know something about the question, and that they are willing to say \u201cI am not sure.\u201d<\/p>\n<p><em>As an aside: It is really important to determine when a person will say \u201cI need help.\u201d I do anytime I need to. And I am not afraid to ask people junior to myself for help. It is a good chance I don\u2019t know everything they know, even when I know a lot more than they do about an overall subject. Because you know, I may have been doing this since before they were born.<\/em><\/p>\n<p>I also 100% respect \u201cI don\u2019t know\u201d. As in \u201cI don\u2019t know how many indexes you can have on a table. I don\u2019t really do that,\u201d is a fine answer for a lot of positions that don\u2019t actually create tables or tune queries. When played right, another good answer to a question like \u201chow many nonclustered indexes can a table have is essentially \u201cWho cares? More than you need.\u201d But it takes talent to be snarky in an interview and endear yourself to everyone in the room.<\/p>\n<p>Sometimes you are just fishing to see what someone knows.<\/p>\n<h2>The most important thing to remember<\/h2>\n<p>The thing to remember with any interview is this. You are being evaluated, and your interviewer is going to seem kind of mean. I know I do (because I have been told by a lot of coworkers at my previous companies, they had that feeling during the interview!)<\/p>\n<p>But despite my love for the interview game, I actually do want you to get all the questions right and get hired. There is nothing more awesome than finding that new coworker who just nails it. I just generally have to hope the rest of the team did their job and made sure they are generally nice people and good workers, because I am terrible at that!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>T-SQL Tuesday is something I don&#8217;t participate in nearly enough. When I saw Kevin Feasel&#8217;s invitation for this months topic, I knew I had to answer! One of my favorite things to do is technical interviews (about stuff that I know). So much so that at one time, I had considered trying to start an&#8230;&hellip;<\/p>\n","protected":false},"author":56085,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[5150],"coauthors":[19684],"class_list":["post-102397","post","type-post","status-publish","format-standard","hentry","category-blogs","tag-professional-development"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/102397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/56085"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=102397"}],"version-history":[{"count":3,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/102397\/revisions"}],"predecessor-version":[{"id":102401,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/102397\/revisions\/102401"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=102397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=102397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=102397"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=102397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}