Results 1 to 4 of 4

Thread: Multi threads

  1. #1
    Join Date
    Jul 2004
    Posts
    23

    Unanswered: 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?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    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

  3. #3
    Join Date
    Jul 2004
    Posts
    23
    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.

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    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

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •