2 ms·
It is, but with all respect, it’s not a useful answer (or even accurate; see below). If one takes, for example and contrast, the top-voted answer, well, I could
by mikestew 5y ago
It is, but with all respect, it’s not a useful answer (or even accurate; see below). If one takes, for example and contrast, the top-voted answer, well, I could probably implement a database index scheme of some sort based on that explanation. Might not be a good one, but it would work. Parent comment’s answer? I wouldn’t know where to start.
Additionally, parent’s answer doesn’t actually answer the question, by saying what an index is, but the question was “how does it work?” The top SO answer does a great job with this one, I think. Another one a few answer down also goes into some of the downsides (it slows down writes, for one). The whole page is worth a skim if you’re not a DBA but have to fiddle with DBs on occasion.