473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Performance issue

We have a legacy application which is in VB. we are migrating it in vb.net (2005).

While coding we found ourself in a fix, the scenario is --

In vb for fetching data we are using Recordset,

While iterating this using while loop we found that iteration is taking 21 sec to fetch about 450 records and looping through them and assigning respective values to excel sheet cells.

For the same thing in vb.net, using Datareader , time is 51 sec. almost 2.5 times. Will you please guide us how can we overcome from this enigma? We have also tried using dataset, but still the response time has not improved.

We have undertaken this migration process mainly for optimizing this process, but instead of performance improvement – we are facing performance degradation.

Kindly suggest an alternative. Would really appreciate a quick response.
Feb 20 '08 #1
2 998
epots9
1,351 Expert 1GB
Moved to the .NET Forums where the resident experts can better assist you.

**Moved from Programming Challenges
Feb 20 '08 #2
Plater
7,872 Expert 4TB
Instead of using a DataReader, consider using a DataAdapter and a DataTable(or DataSet if you want the more encompassing object)
With a DataReader, you have had to have called .Read() and then sift through all data with like .GetValue()

With the DataAdapter you would have something like(with sqlserver as example):
Expand|Select|Wrap|Line Numbers
  1. Dim myDA as SqlDataAdapter
  2. Dim myDT as DataTable
  3. '
  4. ' you would set up your SqlCommand as normal and assign it to myDa
  5. ' it's a quick step, check msdn
  6. '
  7. myDT= new DataTable()
  8. myDA.Fill(myDT)
  9.  
Now you have a full datatable object with everything from your query.
Column names can be accessed via string or index.

Investigate that and see if it helps. I am not sure if that is your problem, but I routinely do over a thousand records from a query, then do a bunch of post-process stuff on each entry and it all takes less then a second.
Feb 20 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paul Mateer | last post by:
Hi, I have been running some queries against a table in a my database and have noted an odd (at least it seems odd to me) performance issue. The table has approximately 5 million rows and...
10
by: **ham | last post by:
I know that's an old dirty issue; GDI+ almost -the slowest part of the framework - has bothered many developers using it in animations. Even in managed C++ the performance is awful. Now, any dude...
115
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical...
13
by: bjarne | last post by:
Willy Denoyette wrote; > ... it > was not the intention of StrousTrup to the achieve the level of efficiency > of C when he invented C++, ... Ahmmm. It was my aim to match the performance...
7
by: James | last post by:
Hi Has anybody had any experience of ASP.Net performance counters not updating. In the performance monitor application when I try to add the groups ASP.NET and ASP.NET Applications the...
17
by: 57R4N63R | last post by:
I'm currently building a website for one of the client. There has been few errors here and there, but just recently the problem is getting worse. Basically the symptoms is that when the user try...
4
by: Steph | last post by:
Hi - Trying to chase down a baffling performance issue. Our database has been running very slow lately. So we are performance tuning the database. In doing so, we created a copy of our...
2
by: Brian Tabios | last post by:
Hello Everyone, I have a very complex performance issue with our production database. Here's the scenario. We have a production webserver server and a development web server. Both are running...
2
by: BTabios | last post by:
Hello Everyone, I have a very complex performance issue with our production database. Here's the scenario. We have a production webserver server and a development web server. Both are running...
5
by: Varangian | last post by:
Hi, I have a performance issue question? which is best (in terms of efficiency and performance, I don't care neatness in code)... building an ArrayList of Object Instances using SqlDataReader...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.