As you said,
Quote:
db is very big and it takes more time to get the results
So it seems you are fetching much more data, that
what you can show on the screen at page load.
In this case it seems, pagination will help. So initially make a query to get only the data (or little more)
which webpage can show to user and then incrementally you can load more data while user clicks on a particular page number. Accordingly you need to optimize query to database too.
There are many samples available for pagination in ASP.NET MVC. I am not sure whether you are using Entity framework or ADO.NET in your project, please search for appropriate code samples.
For quick idea of pagination, have a look on:
http://devproconnections.com/aspnet-mvc/aspnet-mvc-paging-done-perfectly[
^]
http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application[
^]
http://blogs.taiga.nl/martijn/2008/08/27/paging-with-aspnet-mvc/[
^]
For more optimization, use caching in ASP.NET MVC for first few rows of data ....and at database side, use indexing on appropriate columns.
You further queries are most welcome.