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,599 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

762 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

9 Experts available now in Live!

Get 1:1 Help Now