Re:Why you should never use MongoDB (2013)
by hobs on Monday August 15, 2016 @01:24PM
(#12291861)
Indexes are often only a pointer to that data, and they are not denormalized, they are better described as projections of your data (this way saving the work of ordering/filtering on that same projection in the future.)
[ Parent
| on HN ]
Yes, they are pointers. But the indexed fields have to be duplicated for efficient reading. From Wikipedia:
"An index is a copy of select columns of data from a table that can be searched very efficiently that also includes a low-level disk block address or direct link to the complete row of data it was copied from." [1]
When you reference a field in an index, you're effectively duplicating this column on disk.
We can discuss semantics, but at the end of the day, indexes are glorified copies of your columns in a specific order.
Re:Why you should never use MongoDB (2013)
by throwanem on Monday August 15, 2016 @01:27PM
(#12291882)
Not only that, they're projections which you don't have to spend effort on keeping up to date, and which the engine automatically uses to optimize your queries. While there's an argument to be made that the same can be accomplished in a non-relational database with suitable application code or a translation layer, all else equal it's better not to need those things in the first place.
Re:Why you should never use MongoDB (2013)
by phamilton on Monday August 15, 2016 @02:46PM
(#12292525)
And as we saw from a recent Uber post about Postgresql, that automatic updating is not actually free.