Hello, looking for some help.
I have a requirement to query a database for a customer that has over 7,000 rows.
When I run the query, to return 7000 rows, it fails (obviously too much)
Is there a way to query for the 7000 rows but only query and load 15 or so at a time? And when the user clicks the next arrow on the paging grid, it only loads 15-30? So that the interface isn't overloaded?
They aren't going to page through 7,000 records, 15 at a time, but the requirements still want to be able to have an overall customer view.
Thanks,
Discussion posts and replies are publicly visible
Yes, add appropriate paging info to your query.
You should never configure a query to pull back all data, as this is not a scalable design paradigm. Set the paging info batch size to some reasonable number, like 10 or 20, and you should have better results.
You should declare your paging info as a local variable in a load() function, and then reference it in your grid code.
Look at the link Puspendu Pal provided. There is example code farther down the page illustrating what I mean.
Hi Arpit,
Thanks for sharing a rule to call the query enity recursively with variable batchsize. But the problem is that it is return as list of datasubset as output. For example
Suppose if there are 790 records and batchsize is 100, we are getting an single output as list of 8 datasubsets. How to merge the output of 8 datasubset into 1 datasubset. Tried many functions but not able to merge the data at the end.
Actual output is
local!datasubset1 - List of 8 datasubset with batchsize of 100
Expecting an output as
local!datasubset1 - List of 1 datasubset with 790 rows
Thanks in advance for reply.