re: You Can Do it in SQL, Stop Writing Extra Code for it VIEW POST


True, SQL is indeed fast and powerful in data aggregation/manipulation.

We can also pre-compute these data aggregations/manipulations if they are queried frequently by users. I think running these aggregations queries, on the fly, on table with millions of records, by multiple users, maybe a slight overhead on CPU/RAM? No/Yes? Don't know.


True, event-updated projections are a much easier to conceptualize and scale than DB views.


That is where you need to profile the queries, run some explains, check the resource usage and decide where is it better to run it on the DB or code. Thanks!

code of conduct - report abuse