In apex, we get the data of the object through SOQL, about 10,000
records, and we need to display all of these records on the front end (LWC).
I've tried three solutions:
Query all the data through SOQL, and then perform paging display in front end (LWC).
SELECT ID,NAME FROM ACCOUNT WHERE ……
Problems faced: Trigger
CPU TIME OUT
or wait too long.Perform paging query using
OFFSET
.Problems faced: The
maximum 2000
limit is triggered.Search in batches according to
search conditions
Problems faced: Users don't accept this solution.
Are there other solutions to implement paging queries?
^.^