How are the aggregates optimized? Why is it better to use aggregate and retrieve whole data from entities than write advanced SQL and retrieve only what you need. I watched videos and everywhere it is said, that you should only use advanced SQL in case when aggregates can not retrieve data the way you need and that's the extreme case I guess. But I still wonder why is it better.
Hi Nino,
Take a look here and here.
Let me know if this helps,
Pedro
Just look at the previous discussion on the same topic to learn more about OutSystems' optimizations while retrieving records with Aggregates and to understand other related things as well.
https://www.outsystems.com/forums/discussion/72833/aggregate-or-sql-widget/
https://www.outsystems.com/forums/discussion/72693/why-aggregate-and-not-sql/
https://itnext.io/outsystems-101-aggregates-vs-sql-queries-ec7223f4c496