performance - Pagination and sorting large amount of data -
i wondering how implement sorting , pagination mechanism in application using tabular display of data. let's assume have entity id , description. there many instances of them in database. sort alphabetically description. want have result fast. possible without getting database of records, sorting them , displaying part of them? best (from performance point of view) approach problem?
my question rather hypothetical , not pertain particular language or framework.
it can done in 2 passes
the first 1 returns id
s of entity sorted whatever criteria. list of id
s saved in memory.
the second 1 takes 1 page, i.e. sublist of id
s , fetches whole entities database presentation.
Comments
Post a Comment