170
Views
4
Comments
Aggregate Optimizations
Question

Hello everyone.

I´m new in OS and I have a doubt:

In aggregates, when I want to compute something like the total amount of an Entity for each month, what should I do first? Compute the new attribute (sum the amounts) and then do the Group by month or first do the Group by month and then compute new attribute. I did the test and both return the same results.


Thanks in advance.

Best Regards,

Ana Nunes

2019-01-18 21-06-44
Andre Reis

In the case you describe the generated SQL would be the same, so order of operations when using the aggregate shouldn't matter.

2018-11-21 17-31-38
Priya Khade

Ana Nunes wrote:

Hello everyone.

I´m new in OS and I have a doubt:

In aggregates, when I want to compute something like the total amount of an Entity for each month, what should I do first? Compute the new attribute (sum the amounts) and then do the Group by month or first do the Group by month and then compute new attribute. I did the test and both return the same results.


Thanks in advance.

Best Regards,

Ana Nunes


Hi Ana Nunes,

Yes both are the same.

2014-10-21 20-15-17
Alberto Ferreira

Different approaches, same results.... :)

2018-09-07 10-04-42
Suhas Jamdade

You are doing same with different approaches.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.