FYI check out this very detailed reply I recently got from Matthew on the Bubble team about how Bubble’s DB works under the hood esp in regard to aggregation.
Hi Gazinhio,
All of the aggregation operators (count, approximate count, sum, product, median, max, min, average, and any others I’m forgetting) run on the server in a bunch of situations. In fact, I think they’re likelier to run on the server than not. The main situations where we run them client side are usually when the search expression is complicated and can’t be turned into a database query, when there is an advanced filter applied, and when we can rely on client side optimizations (such …