Solved

Performance issue: the speed of loading large data(100,000 records) into DataGrid or DataGridView is too slow

Posted on 2007-11-15
5
1,634 Views
Last Modified: 2013-12-26
I am writing an vb.net application which will replace a legacy application written in ObjectPAL/Paradox. The problem is the performance issue. The old App is able to load the whole table(100,000 records) from Paradox database immediately. For the new vb.net App, it took about 7-10 seconds to load the same table from Oracle database.
First I tried to limit the records per page(load 100 records only) and add navigation buttons to enable the user to go through each page, but the users don' like the navigation buttons. They want to load the whole table just as the old App does.
I tried to create index on the table., and it makes no difference;
I moved from vb.net 2003 to vb.net 2005 to use DataGridView's virtual mode to load data, but it still take about 3-4 seconds to load into the form. Right now the users are complaining the speed of the new App.
Is there anything that I can do to improve the performance?
0
Comment
Question by:patmoli
5 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 20292696
If you place here some code it's easy for us to help!

jpaulino
0
 
LVL 8

Accepted Solution

by:
Wikkard earned 250 total points
ID: 20292758
Would definitely look at optimizing indexes on oracle first, make sure your query/execution plan is optimal also.
You could load the data on a seperate thread, this way your application will remain responsive while the data loads, ie you might be able to trick your users in to perceiving that it runs faster.

Apart from that there isn't much you can do to optimise the data provider or ado.net.
Are you using ODP.NET or MS provider for oracle ?
0
 
LVL 2

Author Comment

by:patmoli
ID: 20294635
For vb.net 2003, I am using OLE DB .NET Data Provider (System.Data.OleDb),
For vb.net 2005, I am using Oracle .NET Data Provider - From Microsoft (System.Data.OracleClient)
0
 
LVL 13

Assisted Solution

by:jmundsack
jmundsack earned 250 total points
ID: 20299089
Not sure if ADO.net still supports this, but have you looked into running the query asynchronously?  ADO 2.1 and above provided the ability to fetch records asynchronously: results would come back in chunks and you can populate the visible portion of the grid right away, while the program continues to run and ADO continues to feed additional rows to the grid in the background.  Have a look at this article for an example:

    http://support.microsoft.com/kb/262311/en-us

Also run a search on Google Groups for "asynchronous recordset" and read some of the Q&A:

    http://groups.google.com/advanced_search?q=asynchronous+recordset+group%3A*vb*&scoring=r&num=100&lr=&as_drrb=q&as_mind=1&as_minm=1&as_miny=1981&as_maxd=16&as_maxm=11&as_maxy=2007&safe=off&

HTH-Jon
0
 
LVL 2

Author Comment

by:patmoli
ID: 20300536
Hi HTH-Jon,

I tried the example on http://support.microsoft.com/kb/262311/en-us as you suggested
But it does not work, the FetchProgress and FetchComplete event never fires, and vb.net won't let you set the properties("Initial Fetch size" ) and ("Background Fetch Size").
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question