Wednesday, August 18, 2010

How to access huge data from Access?

From VB 6, using Access, I want to display, search, etc data from access by using datagrid or listview objects in Visual Basic 6. But it takes more than 60 sec. for 1 lack rows. So I need some trick to overcome this problem.How to access huge data from Access?
Don't use listview for large datasets, its too slow.


Datagrid should work better if you use it in conjunction with ADODC and let it do the pagination for you (meaning loading page by page of data for display).


Minimize number of columns on datagrid (avoid ';Select *';) and avoid complex formatting. Do not use callbacks (any event function) for formatting of data.





So, a ';clean'; recordset display on the ADODC+datagrid with not too many columns and no formatting should work quite fast. If it does not (I doubt), then its a lot of programming.How to access huge data from Access?
Don't bring back all of the data to the client at one time. Bring back just the minimum amount necessary to display in a list at one time. As the user scrolls through the list, fetch more rows from the db. I know that's a pain, but it's the only way to get acceptable performance.





The other thing you can do is to fetch some of the data and when that comes back start fetching the rest on a background thread so that it does not interfere with the user working in the foreground.

No comments:

Post a Comment