SQL statement of an aggregate

How and where can I see what SQL has been generated and executed by an aggregate?
I need this to tune my statement which accesses over one million records.
If you have Service Studio you can now see the last Executed SQL.

Ok thanks, I will upgrade to
However OutSystems still has the file available for download.
If you're using Windows 8.1 you probably will be ok, just try, if it doesn't work just download the

I am using without any problems.

Keep in mind that the property shows the SQL generated to display the results you are previewing on the Aggregate. It is not the SQL that will be generated for your app.

Generally the SQL that will run is more efficient than what's show on the aggregate because:
  • It will only fetch the columns that you use on your logic/UI;
  • It will limit the number of rows fetched.
Check this post for more info. It's a bit old, but the information is still valid.