IMPPROV_IOWAIT

(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)

(Back to main page…)

Description:

This wait type is when a thread has issued an asynchronous read from a bulk load source file and is waiting for the I/O to complete.

(Books Online description: “Occurs when SQL Server waits for a bulk load I/O to finish.”)

Questions/comments on this wait type? Click here to send Paul an email, especially if you have any information to add to this topic.

Added in SQL Server version:

Pre-2005/2005

Removed in SQL Server version:

N/A

Extended Events wait_type value:

The map_key value in sys.dm_xe_map_values is 149 in 2008 and 2008 R2, and 153 in 2012 and 2014 RTM. After 2014 RTM, you must check the DMV to get the latest value as some map_key values have changed in later builds.

Other information:

As general guidance for I/O wait types, if the wait time is higher than acceptable I/O latencies for your environment, investigate whether the I/O subsystem is overloaded or has a configuration problem. See the PAGEIOLATCH_SH wait type for more information.

Known occurrences in SQL Server (list number matches call stack list):

  1. Waiting for a file read to complete during a bulk load
  2. Waiting for a bulk insert stream to close during a bulk load

And other similar call stacks.

Abbreviated call stacks (list number matches known occurrences list):

  1. SOS_Task::PostWait+6e
    EventInternal<SuspendQueueSLock>::Wait+210
    CStreamBuf::WaitIoCompletion+11e
    CImportStream::SwitchBuffer+493
    CImpImportProvider::GetRowsetPtr+82d
    CreateInprocProvider+35a
    CBcpImport::InitForOpenRowset+1c0
    CreateBulkRowset+c9
    COledbRangeStreamBulk::GetRowset+27
    CQScanRmtBaseNew::OpenHelper+76
    CQueryScan::StartupQuery+1e0
    CXStmtQuery::SetupQueryScanAndExpression+19f
    CXStmtQuery::InitForExecute+1f
    CXStmtQuery::ErsqExecuteQuery+2fb
    CXStmtSelect::XretExecute+28a
    CMsqlExecContext::ExecuteStmts<1,1>+352
    CMsqlExecContext::FExecute+878
    CSQLSource::Execute+7d3
  2. XeSosPkg::wait_completed::Publish+0x1dc
    SOS_Task::PostWait+0x6f
    WaitableBase::Wait+0x19c
    CStreamBuf::WaitIoCompletion+0x118
    CImportStream::~CImportStream+0xec
    CImportStream::`scalar deleting destructor’+0xe
    CImportRowset::~CImportRowset+0x111
    CImportRowset::Release+0x20
    COledbRangeStreamBulk::DoNormalize+0x15e
    COledbRange::Normalize+0x152
    CAlgTableMetadata::FPartialBind+0x45f
    CAlgTableMetadata::Bind+0x31b
    CRelOp_Get::BindTree+0x61c
    COptExpr::BindTree+0x85
    CRelOp_QuerySpec::BindTree+0x1ea
    COptExpr::BindTree+0x85
    CRelOp_Insert::BindTree+0xdf
    COptExpr::BindTree+0x85
    CRelOp_DMLQuery::BindTree+0x76
    COptExpr::BindTree+0x85
    CRelOp_Query::FAlgebrizeQuery+0x4e7
    CStmtBulkInsert::FBind+0x44