Re:How to make MongoDB not suck for analytics
by georgewfraser on Monday July 02, 2018 @04:14AM
(#17440045)
You say you need indexes because “users want to slice and dice by various axes”, but have you checked that the query planner actually uses these indices? When an aggregation includes a meaningful percentage of the table, a sequential scan will be faster than a series of indexed lookups. This is part of the reason why column stores don’t use indexes—they just aren’t that useful for analytical queries.
[ Parent
| on HN ]
Re:How to make MongoDB not suck for analytics
by stickfigure on Monday July 02, 2018 @02:41PM
(#17444317)
YMMV but yes, for our application they were very significant. In a marketplace app with a significant number of sellers, most queries will be highly selective if only because they'll usually be filtered by seller.
One of the top queries will be "show me my all-time sales". If your only index is time, you will touch your whole database every single time a customer asks for it...