Friday, March 30, 2012

Multi threads

I have an app that is critical to our business. It handles and syncronises several SQL Servers, checks integrety etc. I need to make the app so it can run a few things at once. Does anyone have any experience with this? Currently we use Delphi and ADO. I have been fiddling with DMO to get more performance - I am not sure ADO is very quick for some I tasks I need to do.

I suppose my main question *really* is does ADO/DMO multi-thread and has anyone tried it. If not how do people do it?Yes, ADO emphatically multi-threads. I regularly run one app that for a few moments has 30+ threads running with no problems at all.

Then again, I'm well known for doing extremely perverse things with multi-threading (including a couple of multi-threaded batch files!).

-PatP|||That's interesting, is there anything you would recommend that I do/not do?

Also, do you have to use client cursors? I tend to find using more than one and I ger problems generally.|||Use connection pooling!!!
Use a separate connection object for every active recordset.
Close every connection as soon as you are done using it and free any memory it is/was using.
Keep your recordsets as small as practical (more threads, more network traffic, more contention).
When referencing database objects, do so strategically to avoid the app blocking itself

-PatPsql

No comments:

Post a Comment