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 ids of entity sorted whatever criteria. list of ids saved in memory.

the second 1 takes 1 page, i.e. sublist of ids , fetches whole entities database presentation.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -