1

I have a project that loads millions of records. I will be using asp.net mvc 3 or 4. I am sure my page would load very slow because of much data retrieved from the server. I have been creating SQL Server agent job to perform early queries and save it in a temporary table which will be used in the site. I am sure there are many better ways. Please help. I have heard of IndexedDB or WebSQL for client side Database. Any help/suggestion would be appreciated.

My first Post/Question here in stackover!

Thanks, In Advance!

Taerni
  • 11
  • 1
  • 2

4 Answers4

2

You might want to look at pagination. If the search returns 700,000+ records you can separate them into different pages (100 per page or something) so the page won't take forever to load.

Check similar question here

Community
  • 1
  • 1
whastupduck
  • 1,156
  • 11
  • 25
  • I am not using grid or paging. It will just be an ordinary List object and will be converted to json in client side. User will select a date range and some fields to select. so it would post again back to the server to query based on the selected date range. I am looking for a better way than posting back and forth to the server. – Taerni Jun 19 '13 at 07:41
1

I've been dealing with a similar problem 500K data stored on client side in IndexedDB. I use multiple web workers to store the data on the client side (supported only in chrome) and I only post the id's and the action that is used on the data to the server side.

In order to achieve greater speed, I've found that the optimal data transfer rate is achieved using 4-8 web workers all retrieving and storing 1K - 2.5K items per call, that's about 1MB of data.

Things you should consider are:

  • limiting the actions that are allowed during synchronization process
  • updates of the data on server vs client side - I use the approach of always updating data on server side and calling sync procedure to sync the changed data back to the client side
  • what are you going to store in memory - Google Chrome limit is 1.6GB so be careful with memory leaks, i currently use no more than 300MB during the synchronization - 100-150MB is the average during regular work
Deni Spasovski
  • 4,004
  • 3
  • 35
  • 52
0

You need to split the data by pages. Retrieve certain range from the database. Do you really need millions of rows at once. I think there should be a filter first of all.

iefpw
  • 6,816
  • 15
  • 55
  • 79
0

Paging is definitely the way to go. However, you want to make the site responsive, so what you should do is use Ajax to run in the background to load up the data continuously while the letting the user to interact with the site with initial set of data.

Jack
  • 2,600
  • 23
  • 29