Performance  in disconnected recordset

Posted on 2001-06-07
Last Modified: 2008-03-17
We are doing highly database intensive calulations.
We are fetching millions of records and doing calculations in loop and updating/inserting records in tables.We have created indexes and views to improve the speed and we are able to achieve 80000 records in 8 minutes.

But now same stored procedures are required to be imlplemented in COM using batch processing (disconnected recordset).

We are calling batchupdate of recordset to updates after calculations are done in COM.BAtch Update is taking more time and as a result its taking huge time. Why batch update takes so much time.

Can we improve performance of disconnected recordset


Question by:hemant

Accepted Solution

jrspano earned 50 total points
ID: 6163863
when you disconnect the batch recordset it is separated from the db.  when you issue the batch update it has to look at the db and see what has changed and then marshal your changes to the db and handle any rows that have changed between the get recordset and the update.  to improve performance i would use strait sql.  recordset processing is slow sql would allow the server to do all the work.  I haven't yet found something that sql couldn't do, granted that it will propably be much harder to write than the vb.

Expert Comment

ID: 6163898
I can't see a disconnected recordset with millions of records performing well at all.  All the data will be read to your client machine, which will take *ages*, and will probably use up lots of memory, too.

What is the nature of the processing you need to do?

Author Comment

ID: 6164322
But why do we use COM then. Why not com perform better.I do know Stored procedures are better  but MSDN says that Disconnected is second option to Stored proc.

Atleast it should not take 3 times the time waht stored procedures is taking.

How do we improve performance in COM.

Disconnected recordset is used that purpose only.

Plz provide more guidace if possible.
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.


Expert Comment

ID: 6164481
you might want to try a async recordset.  this would allow you to do other things while com is marshaling the recordset.  you would then check to see when it is done

Author Comment

ID: 6166750
I cannot use Async as my logic is such. I need to process all the records before i do the batch update. After that no other processing is taking place.So no processing can go on when recordset is marshalling.



Author Comment

ID: 6166789

What about this one. Can we convert Recordset into XML and do modifications to XML file. After doing all the calculations and storing it into XML we can convert it back into recordset and do the batch update



Expert Comment

ID: 6167359
I think that should work.  ado has methods to save a recordset as xml.  you then modify the file and then reload a ado rs from the file and do your batch update.

Author Comment

ID: 6169263
Thanx for all u r support.


LVL 49

Expert Comment

ID: 7133410
Hi hemant@devx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept jrspano's comment(s) as an answer.

hemant@devx, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer

Expert Comment

ID: 7167811
Comment from expert accepted as answer

E-E Moderator

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 60
MsgBox 2 59
Problem to line 23 55
Collapse and expand table in Word 2010 2 38
Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

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