Results 1 to 10 of 10

Thread: [Resolved] Is Stored Procedure using CPU?

  1. #1

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Resolved [Resolved] Is Stored Procedure using CPU?

    Hi, there

    I'm using stored procedure that are used to calculate commission.
    Task manager shown as PF usage is not increased
    but CPU usage is increasing up.

    How can I use other server or computer to share a CPU for thease stored procedure?

    Any idea?
    Last edited by naruponk; Sep 8th, 2006 at 10:23 PM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Is Stored Procedure using CPU?

    Is your query really that enormous? Is the CPU usage really that high? Because that'd be one incredible query... since SQL Server, on a single instance, can handle a very large load by itself. However, you do have the option of SQL Server Load Balancing

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Is Stored Procedure using CPU?

    Do you have SQL installed locally - or is it on another server already?

    Seems from your question that you could put it on another server - why not just do that.

    If you are so concerned about CPU it should be on a dedicated machine.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Is Stored Procedure using CPU?

    CPU usage is around 95-98% when run it.
    Is load balancing able to get it faster?

    Now, I have only one server that installed SQL Server on this server.

    Do you have any suggestion?

  5. #5
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Is Stored Procedure using CPU?

    Quote Originally Posted by szlamany
    Do you have SQL installed locally - or is it on another server already?
    You didn't really clearly answer this question.

    If this SERVER you have SQL on a dedicated server? What else is running on this box at the same time?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  6. #6

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Is Stored Procedure using CPU?

    There is nothing to run at the same time,
    I'm not sure that am I answer clear or not, if not please let me know.

    Thanks for help

  7. #7
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Is Stored Procedure using CPU?

    Then why is the CPU usage bothering you?

    I would want my hard-running queries that need lots of resources to get them - if the CPU hits 95% when a big query runs then that's a good thing.

    What is it interfering with?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  8. #8

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Is Stored Procedure using CPU?

    Do you mean I'm good that create query which is using CPU nearly 100% ?
    If so, how can I get it faster?

  9. #9
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Is Stored Procedure using CPU?

    A CPU only has so much horsepower...

    Go into taskmgr (Task Manager) and go to the PROCESSES tab and click on the CPU column - to sort that column. Sort it so the highest CPU %-age job is at the top.

    My PC shows "System Idle Process" usually at the top - unless of course I am running something intensive - like a virus scan, for instance.

    When I run that virus scan I would like to see the "System Idle Process" disappear - so that as much available CPU is given to that task.

    I also want other tasks that might want to run at the same time as the virus scan, for example, to get a fair share of CPU when they need it.

    I would only be concerned if those other tasks were noticeably delayed by the virus scan. I would hope that the job scheduler would make sure to divide up resources appropriately.

    Where do you expect to get more CPU out of?

    If you want us to review your query to see if it can be made quicker - in other words - take less resources - we can do that.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  10. #10

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Is Stored Procedure using CPU?

    Thanks a lot for your reply,
    You make me clear about this.

Posting Permissions

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



Click Here to Expand Forum to Full Width