30
Views
2
Comments
All columns returned in aggregate
Question

We have an external, on-premises, SQL Server database that we use with our Outsytems app. I am creating a small, reactive app for test purposes that references an external entity with millions of rows. The performance problem that I am seeing is that the aggregate is not at all optimizing the query, but returning every single column, like a "SELECT *" in SQL, which is a huge no-no. The form was created using scaffolding, by dragging the aggregate on to the screen. Why is the SQL asking for all columns when only 4 are referenced?

Could it be related to the fact that the entity is derived from a SQL View with multiple tables?


mvp_badge
MVP
Rank: #96

Hi Joseph,

I found a clause mentioned in the documentation which states that the Aggregate will return all the field values, please refer the below link

https://success.outsystems.com/Documentation/Best_Practices/Performance/Performance_Best_Practices_-_Queries


Regards,

Benjith Sam

Rank: #7570

Thanks, but none of those situations apply. There are some good points there that I will use for other projects, though.