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,616 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now