3 ms·
I think it's a perfectly reasonable question. I wouldn't expect a candidate to know all the implementation details for any particular database, even one they'v
by skewart 9y ago
I think it's a perfectly reasonable question. I wouldn't expect a candidate to know all the implementation details for any particular database, even one they've worked with a lot. But I would expect them to have a general idea about how an index typically works (e.g. "some form of binary search tree"), or at least be able to reason from first principals given the problem it's intended to solve. From a different angle, I think it would be perfectly reasonable to ask someone what kind of data structures they would turn to if they needed fast lookups in an unordered list.
No one question should ever disqualify a candidate, but I'd be a little concerned that someone who can't even begin to reason through how an index might work would treat them as magical black boxes that just make everything faster. And that's certainly not true. For some kinds of data they don't speed up lookup time at all. In some situations they speed up reads, but slow down writes considerably. I'd expect someone to have enough foundational knowledge so that when they're on the job they could do a bit of quick research and decide if adding an index on any given column was a good idea or not.