Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Tiago Neves
11
Views
1
Comments
Performance - To Function() or not to Function()
Question
Hi everyone,
I would like to understand, performance wise, what is the best option: Entity function or Query/Aggregate?
Let's say I have an action (B) that I'm using inside another action (A). That (B) has input parameters and I define the value for those parameters using some Entity functions nested in If's. Is that, performance wise, better than inserting a Query/Aggregate before that action (B) to get their results in the Locals scope to be used for the value of action (B) input parameters?
This is just an example, I just want to understand what performs better: Entity function or Query/Aggregate?
It depends, if I use many entity functions or not... But can someone give me a better insight?
I've already read "Performance Tuning for OutSystems Applications - Technical Note" which states:
Replace Get<Entity> invocations:
- If you don't need to retrieve all Entity Attributes, consider replacing the Get<Entity> invocation by a Simple Query using an Identifier parameter. Platform Server will optimize the query to retrieve the required attributes.
Is this still valid?
André Vieira
Staff
Yes it is still valid. Get<Entity> actions/functions return the whole entity, meaning all attributes. Aggregates are optimized in scope, so as long as you are not using all the attributes of the entity then only the ones that you need in that scope are fetched.
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...