Link to home
Start Free TrialLog in
Avatar of vbhaha
vbhaha

asked on

Reduce time for DataAdapter to fill rows

I have a table with few hundred thousand rows. It needs a minute to fill(DataAdapter.fill(datatable)) all rows from the server for records browsing. Unfortunately it is necessary to allow user to browse all records!!!

How can I speedup the time for fill rows and allow user to browse all records.

Thanks in advance.
Avatar of Dabas
Dabas
Flag of Australia image

Can you please post the Adapter's Select Command?
Avatar of arif_eqbal
arif_eqbal

you can go for multiThreading so that the user simulteneously Browses as Records get filled???
Hi,
1 Way :
Optimize your Query to DB.

2 Way:  
use SqlDataReader in place DataSet, SqlDataReader is a least 10 time faster than DataSet.
Create the Query only with the filters that each search need.

What DB are you using?

GL
Avatar of vbhaha

ASKER

1. There is nothing can be changed in the "Select" statement.  Just like that "Select * from table"

2. It should allow user to update, so cannot use datareader.

3. arif_eqbal, would you give me more details ?



Cant you filter the records a little, ie

Select * from table where something = 'something';

Surely the user has an idea of what they are after, and surely they arent going to look at all the records.

Dave
why dont u use a caching mechanism where u keep using the dataset in the cache unless a user updates the dataset then u reapply the query
ASKER CERTIFIED SOLUTION
Avatar of arif_eqbal
arif_eqbal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can populate the datagrid in a background thread, take a look at the following article

http://support.microsoft.com/default.aspx?scid=kb;en-us;318604
Avatar of vbhaha

ASKER

arif_eqbal, it sounds good, could you give me more details or examples about it ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nice summary ! :)
GL