which operations will use more CPU resource?

  • in SQL Server, which operations will use more CPU resource? it seems that compilation and recompilation will lead to high CPU workload. are there any other operation will cause cpu high workload. thanks !

  • Every single query is using some CPU. Depending on what the queries are doing, sorts, etc., more CPU is necessary to figure things out. Parallelism causes CPU because a given query uses more. Data compression. Encryption. Bad or missing indexes. Missing or out of date statistics. Bad code. All this contributes to CPU use. It's not just about compiles & recompiles.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • 892717952 wrote:

    in SQL Server, which operations will use more CPU resource? it seems that compilation and recompilation will lead to high CPU workload. are there any other operation will cause cpu high workload. thanks !

    You need to measure your system.  Compilation and Recompilation can actually be a God-send in some cases and absolute the worst thing that can happen in other cases.    The same holds true for CPU workload.   For example, does parallelism help or hurt during the given workload?  There is no rule of thumb here.  "It Depends" and you "Must Look Eye".

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden wrote:

    892717952 wrote:

    in SQL Server, which operations will use more CPU resource? it seems that compilation and recompilation will lead to high CPU workload. are there any other operation will cause cpu high workload. thanks !

    You need to measure your system.  Compilation and Recompilation can actually be a God-send in some cases and absolute the worst thing that can happen in other cases.    The same holds true for CPU workload.   For example, does parallelism help or hurt during the given workload?  There is no rule of thumb here.  "It Depends" and you "Must Look Eye".

    Thank you for your good  idea!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply