asp.net - Which is better: to sort results at the database level or at the application level -


suppose have page in site displays records database.

we need display records sorted column.

which approach gives better performance: retreive data sorted database or apply sorting on grid ?

thanks

that depends on amount of data want display. few records can shown on 1 page , sure remain constant can sorted on ui side.

for large data, sorting @ database better. if ui has pagination support, sorting @ database side avoid passing huge data ui , ui discarding rows except related first page.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -