Hello everyone,

When i take a look at the executed SQL of an aggregate, Outsystems always Does this:

Select *


    Select ..... 

    from .... 

    where .... 

    groupBy ...

Is there a reason why it wraps the actual select into another 'Select *'? According to the executed SQL, the actual select is explicitly run as a subquery...
I have this with every aggregate. And if this is REALLY the executed SQL, then i have my doubts about performance...

Example screenshot :



Hehe, little faith that the database engine optimizations won't take care of that.

Now seriously, that is necessary in some situations  like when the number of rows are limited (something that is not present in that as the warning on top says). I'm not sure if we remove it when it's not necessary, but even if didn't, the database engine would just optimize it internally automatically.

You can read here a bit more about the row limiting: http://www.oracle.com/technetwork/issue-archive/2006/06-sep/o56asktom-086197.html


João Rosado