zoukankan      html  css  js  c++  java
  • SQL Server 2005: Wait Type CXPACKET

    Wait type - CXPACKET 

    It means SQL Query is involved in parallel query execution. This waittype indicates that the SPID is waiting on a parallel process to complete or start.

    CXPACKET: Occurs when trying to synchronize the query processor exchange iterator. You may consider lowering the degree of parallelism if contention on this wait type becomes a problem.

    ******
    How to configure cost threshold for parallelism Option

    Use the cost threshold for parallelism option to specify the threshold at which Microsoft SQL Server creates and runs parallel plans for queries. SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value set in cost threshold for parallelism. The cost refers to an estimated elapsed time in seconds required to run the serial plan on a specific hardware configuration. Only set cost threshold for parallelism on symmetric multiprocessors.

    Longer queries usually benefit from parallel plans; the performance advantage negates the additional time required to initialize, synchronize, and terminate parallel plans. The cost threshold for parallelism option is actively used when a mix of short and longer queries is run. The short queries run serial plans, whereas the longer queries use parallel plans. The value of cost threshold for parallelism determines which queries are considered short, and they should therefore be run using serial plans.

    In certain cases, a parallel plan may be chosen even though the query's cost plan is less than the current cost threshold for parallelism value. This can happen because the decision to use a parallel or serial plan is based on a cost estimate provided before the full optimization is complete.

    The cost threshold for parallelism option can be set to any value from 0 through 32767. The default value is 5.

    SQL Server ignores the cost threshold for parallelism value under the following conditions:

    • Your computer has only one processor.
    • Only a single CPU is available to SQL Server because of the affinity mask configuration option.
    • The max degree of parallelism option is set to 1.

    The cost threshold for parallelism option is an advanced option. If you are using the sp_configure system stored procedure to change the setting, you can change cost threshold for parallelism only when show advanced options is set to 1. The setting takes effect immediately (without a server restart).

    sp_configure 'show advanced options', 1;

    GO

    reconfigure;

    GO

    sp_configure 'cost threshold for parallelism', 10;

    GO

    reconfigure;

    GO

  • 相关阅读:
    Android IOS WebRTC 音视频开发总结(五十)-- 技术服务如何定价?
    Android IOS WebRTC 音视频开发总结(四九)-- ffmpeg介绍
    Android IOS WebRTC 音视频开发总结(四八)-- 从商业和技术的角度看视频行业的机会
    Android IOS WebRTC 音视频开发总结(四七)-- 深度解读国内首届WebRTC大会背后的真相
    小程序缓存二开(带有效时间)
    小程序笔记五:页面数据传递
    小程序笔记四:表单提交form
    小程序笔记三:幻灯片swiper 和图片自定义高度
    小程序笔记二:部署
    小程序笔记一:基础设置
  • 原文地址:https://www.cnblogs.com/rickie/p/1111965.html
Copyright © 2011-2022 走看看