3 ms·
> I read that the problem with Limit is that it is applied on the end. Meaning their original query will happily take all available results, sort them and then
by smnc 9y ago
> I read that the problem with Limit is that it is applied on the end. Meaning their original query will happily take all available results, sort them and then return the first 9. If normal values for freq are known, a simple WHERE freq > X could have helped.
Well you can't get around that considering that `freq` is the result of aggregation. Therefore you do have to "take all available results". Or you could keep a tally for all users and refresh it periodically.