Re:Use SQL subqueries to count distinct 50x faster
by pradocchia on Friday January 24, 2014 @10:46AM
(#7115420)
I think this was more an exposition on the general technique than specific recommendation.
The general theme should be, "how do I make my database do less work?" followed by a list of techniques, including "pre-aggregate to reduce volume". In this case, the pre-aggregates are in-line. Whether in-line pre-aggregates are appropriate will depend on context, just as you say.
The general theme should be, "how do I make my database do less work?" followed by a list of techniques, including "pre-aggregate to reduce volume". In this case, the pre-aggregates are in-line. Whether in-line pre-aggregates are appropriate will depend on context, just as you say.