Table Records with List_Navigation performance issues
931
Views
4
Comments
New
Backend

Hello,

  • I am having a Table Records with List_Navigation for the paging purpose.
  • Table Records is associated with aggregate.
  • Line Count of Table Records is 10.

When Page loads Table record displays first 10 row of aggregate but I checked in prepration aggregate fetched 11 row from database id anyone having any idea why aggregate fetching 11 rows first time and when click on next page then it fetching 11+10= 21 rows, It means first time it is fetching Line Count of Table Records +1=11 row.

As per my understanding if I click on page number 5th then aggregate will fetch 51 records in this way there will be performance issue when record count is large so my suggestion is it should be handled in way no matter in which page number user click aggregate/advance sql will fetch only that page data from database to improve performance.


Regards

-SK-

We also had similar performance issues.

2023-05-18 09-00-19
Ricardo Vaz Alves
Changed the category to
Backend

Yep it's due to the way OutSystems handles paging. On the first call it does and SQL top 10 and fetches 11 records (I think it's actually 10 records and the 11th is the Count property). Then when you move to the next page it does and SQL top 20 and fetches 21 records and so on. This is a quick and dirty way of implementing SQL paging. Later versions of SQL do have the capabilities for returning only a window of the data instead of just the top records but this isn't implemented in Outsystems, possibly because not all database engines support it. 

There is an idea already registered asking for this capability to be updated, might be worth finding and voting for that one.