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

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

Performance in disconnected recordset

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

Regards,

HEmant
0
hemant
Asked:
hemant
1 Solution
 
jrspanoCommented:
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.
0
 
anthony_glenwrightCommented:
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?
0
 
hemantAuthor Commented:
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jrspanoCommented:
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
0
 
hemantAuthor Commented:
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.

Regards,

Hemant
0
 
hemantAuthor Commented:
Hi,

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

Regrads,

HEmant
0
 
jrspanoCommented:
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.
0
 
hemantAuthor Commented:
Thanx for all u r support.

regards,

hemant
0
 
DanRollinsCommented:
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
0
 
Computer101Commented:
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

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