Aggregates starting at index X (Aggregates Paging)

By Vasco Pessanha on 18 Jan

It would be great to have a Start Index property in Aggregates so that I can have pagination patterns even without UI. This way, I could state that I want 50 records starting from record 50 (e.g. to display them in the second page of a table).


Ayumi Fukushima29 Jun 2015
In current situation, OutSystems Platform only allows limiting the max records which are obtained (LIMIT / TOP). It is not optimized to allow primitives such as OFFSET to be included.
For this reason, it require huge time to fetch data from database using Aggregate. If OFFSET inplemented. it allows to do more faster data processing can do through Aggregate.

Merged from 'Inplement OFFSET for Aggregate' (idea created on 2015-06-29 03:29:12 by Ayumi Fukushima), on 2017-01-18 14:50:04 by Goncalo Borrega
-29 May 2016
Add the ability for paging should be a core feature built into simple query widget (Instead of having to create an "Advance SQL Query" with paging like this - for every single get record list query!)

MySQL: 
SELECT * FROM {Country} ORDER BY {Country}.[Name] LIMIT 25 OFFSET 25 

ORACLE/SQL Server
SELECT * FROM  {Country} ORDER BY  {Country}.[Name] OFFSET 25 ROWS FETCH NEXT 25 ROWS ONLY;

Note: When you build a web service more than likely you would add a get record list web service, and these services would require
 paging (Limit, Offset), all popular web services contain paging from facebook, twitter, linkedin, google etc

Merged from '[Simple Query] Add the ability for paging,' (idea created on 2016-05-29 09:20:42 by Robert Chanphakeo), on 2017-01-18 14:50:51 by Goncalo Borrega
George Jeffcock29 May 2016
and DB2 for i  ;)

SQL Paging With Limit And Offset In DB2 For i

Merged from '[Simple Query] Add the ability for paging,' (idea created on 2016-05-29 09:20:42 by Robert Chanphakeo), on 2017-01-18 14:50:51 by Goncalo Borrega
Rebecca Hall13 Jul 2016
You can set the Record Limit on the Query

Merged from '[Simple Query] Add the ability for paging,' (idea created on 2016-05-29 09:20:42 by Robert Chanphakeo), on 2017-01-18 14:50:51 by Goncalo Borrega
-13 Jul 2016

Rebecca, you can not do paging with record limit. The query needs to know where to start (offset) 



Merged from '[Simple Query] Add the ability for paging,' (idea created on 2016-05-29 09:20:42 by Robert Chanphakeo), on 2017-01-18 14:50:51 by Goncalo Borrega

I second this idea. We had to convert a lot of aggregates to Advanced Queries just to be able to page the results. It surprised me that this isn't possible with OutSystems

I voice my support for this as well. We had to switch to advanced queries to implement paging (using OFFSET and FETCH NEXT). The biggest downside to this is it appears that using these queries to page through results gives us extremely slow query times (probably because OS uses "sp_executesql" to run the query). Because of how slow the query runs it's not a very good solution at all. I would love to see something implemented by the OS team that is performant and easy to set up.

I support this idea, I want to avoid complex queries as much as possible. Especially when exposing data using webservices and or server actions.

Would be nice if there was an startIndex property on the query so you only need to set that one with the max records and it's done!