Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1744
  • Last Modified:

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

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
patmoli
Asked:
patmoli
2 Solutions
 
jpaulinoCommented:
If you place here some code it's easy for us to help!

jpaulino
0
 
WikkardCommented:
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
 
patmoliAuthor Commented:
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
 
jmundsackCommented:
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
 
patmoliAuthor Commented:
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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now