Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005

    Unanswered: double threading a procedure?

    Over some time now, I've been developing a fairly hefty stored procedure, that does a lot of computations, and fairly few table lookups.

    When I look at the performance on my server (a dual Xeon HT) I can see that it only uses 1 out of 4 possible "cpus" to work on the calculations, while the three others idle out, and was wondering if I can somehow force it to use max available CPU power?
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  2. #2
    Join Date
    Jan 2004
    In a large office with bad lighting
    The optimizer is usually pretty good about choosing the execution plan. But it can be influenced.

    Have you checked your MAXDOP setting? If it is set to 1, you can bump it up. But as with all advice, caveat executor!

    -- This is all just a Figment of my Imagination --

  3. #3
    Join Date
    Nov 2002
    Me personally, I would have compartmentalized the sproc into smaller units of work, i.e., I would have made many sprocs instead of a mongo one.

    To get the to run independantly, we have in the past set these many sprocs to be executed as jobs, then have a sproc that launches all of the jobs. The launch will be serial, but the execution would not be.

    With one big sproc, everything is serial, and you are not pushing the CPU hard enough anyway. If you want additional ways to thread, you should set up your tables as partitioned views. then the CPU can thread out.

    Other than that, with your methodology, there is no way where it will thread, or use additional cpus


    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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