function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
N Hemanth kumarN Hemanth kumar 

drawbacks of pagination using Querymore?

Akshay_DhimanAkshay_Dhiman
Hi Hemanth Kumar,


Before the creation of the OFFSET clause, the only way to paginate with the Force.com involved using the query and queryMore SOAP API calls.
Although developers might think that the OFFSET clause has made the query and queryMore calls obsolete in pagination design, this assumption is only true in some cases.
The query and queryMore calls still provide a performance edge when you're paginating over large data sets because they hold a server-side cursor (batch), which in turn stores the data in the API Cursor Server (ACS).

The ACS is a server that manages cursors to allow application servers to perform optimally.
Subsequent requests for additional data only need to hit the ACS to retrieve data, which is faster than executing queries for each set of data. Remember that when you use this tool to paginate,
you can only retrieve data moving forward, which will either limit functionality in the page or require more memory usage.
When building pagination on the Force.com platform with Visualforce, do not execute a query to retrieve data for pagination--the other tools can provide the same functionality and minimize page state, which increases page response time.

For more information, you can go through this link
https://developer.salesforce.com/page/Paginating_Data_for_Force.com_Applications

Thank You
Akshay