136
Views
4
Comments
Fetching Bulk amount of data from aggregate

Hi all,

I am creating a summary table for that I am using aggregates having 15 entities but fetching data is taking so much of time so I optimized by dividing that aggregate into small aggregates in data action but still even 2000+ records data is not fetching. can anyone give an alternative method  to have high performance and fetching data in short period of time?


2023-04-06 11-24-23
Paulo Zacarias

Hi Peruri, 

I would suggest you create an advanced query (SQL node) instead of multiple aggregates.

Please take a look at this post with some tips for query optimization:
https://www.outsystems.com/forums/discussion/87949/reactive-application-slow-performance-on-last-page-of-table/

And also this great article to better understand SQL tunning:

https://itnext.io/sql-performance-tuning-72e9ebf67549

Regards, 

PZ

UserImage.jpg
Peruri Satya Siva Teja

Hi Paulo,

In that aggregates I am using some calculated attributes which are not supported in SQL.


2023-01-26 16-03-24
Ana Agostinho

Hello Peruri Satya Siva Teja,

All the calculated attributes present on aggregates are also available in SQL. An aggregate, in the end, is just a way to fetch data using an optimized query proposed by OS.  It might lead to "more work" since it is not just straightforward as doing some clicks in the aggregate, but you can do max, min, count, and group by in SQL too. 

You might need to look for some documentation: (for example)

Best regards, 
Ana

2023-04-06 11-24-23
Paulo Zacarias

Hi Peruri, 

Ana is right, please take your time exploring that documentation because, in the end, it will pay off.

Even if you are not willing to replace everything with an SQL node, replacing some of those aggregates will probably improve the performance of your summary action.

Regards, 

PZ

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