Click here to Skip to main content
15,920,618 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I am fetching data from database using asp.net , but problem is that DB table contains more then 100,000 rows of data. My UI runs slowly when it fetchs the data , and it takes a lot lot time .

Please suggest for faster fetching.
Posted
Updated 31-May-11 11:36am
v3
Comments
Keith Barrow 31-May-11 17:36pm    
Is your query returning 100,000 rows or is that just the table size?

It's horrible man that loading 100,000 rows at a time. Just think about the end user, they never like that much delay or something.

Just use paging, filtering in data.

In database side
SQL Server 2005 Paging Results[^]

In your controls
GridView Multiple Filter AJAX Control[^]
Repeater with Paging and Sorting Features[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 31-May-11 22:56pm    
Absolutely, my 5.
--SA
The user never wants to see 100,000 rows of data at a time. The control you're using can be used in a virtual mode. In this way, you will fetch only the data which could be visible on one screen, ideally, 3 or so times more. If a user wants to look at previous/next page, it will be a situation of cache hit, so the result will be rendered almost immediately. In worst cases, the user wants to scroll far away; and it will be a total cache miss, but re-fetching of full data will not take too long time as this is just another 3+ screens of data. You can devise more sophisticated caching mechanism, but the idea will be pretty much the same, http://en.wikipedia.org/wiki/Cache[^].

—SA
 
Share this answer
 
Comments
Manfred Rudolf Bihy 31-May-11 18:18pm    
Good advice! 5+
Sergey Alexandrovich Kryukov 31-May-11 20:00pm    
Thank you, Manfred.
--SA
Raj Bose 31-May-11 18:26pm    
Thanks
Sergey Alexandrovich Kryukov 31-May-11 20:01pm    
You're welcome.
Are you going to formally accept this solution (green button)?
Thank you.
--SA
Manfred Rudolf Bihy 31-May-11 20:29pm    
Proposed as solution!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900