The OLEDB Wait Type and How to Reduce It

reduce oledb wait type

In this post, I look at the OLEDB wait type.

Books Online lists this as

“Occurs when SQL Server calls the SQL Server Native Client OLEDB Provider. This wait type is not used for synchronization. Instead, it indicates the duration of calls to the OLE DB provider.”

“OLEDB” stands for Object Linking Embedding Database. OLEDB is an API used by SQL Server when retrieving data from a remote server or datasource.

Linked server queries, remote procedure calls, BULK INSERT operations, full text search and queries to external data sources, for example Excel all contribute to OLEDB wait type.

The wait type occurs when the remote system or network connection is not fast enough and so the calling server has to wait for the results to be returned.

Guidance on what to check and ideas on how to reduce OLEDB wait type

If the stats for OLEDB wait type are high then there are some things you can do:

  1. Look at your data distribution – are the linked server calls absolutely necessary?
  2. If the data being referenced is static then consider copying the data to local database and query it there.
  3. Consider using replication to bring the data local.
  4. If the data source is some file such as Excel, can you reference it locally instead of over a network connection?
  5. Is it feasible to import the Excel file into the database?
  6. Tune the remote query if you can. If it is a server which you are able to administer or you can speak with the DBA of that system, then find ways to make that query run faster – check indexes, check statistics etc.
  7. Have your network admins check over the connection between the server and data source. Is it fast enough?
  8. OLEDB may be a symptom of another wait type. For example check RESOURCE_SEMAPHORE wait type – is this high?

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestBuffer this pageShare on RedditShare on StumbleUpon
About Andy Hayes

Andy Hayes is a DBA working with SQL Server since version 7.0. He has a wonderful wife and two beautiful children. He loves database technology, playing cricket, and blogging. He is passionate about sharing his experiences as a DBA and learning more to further his understanding and knowledge. You can follow me on Twitter, check out my Facebook page or follow me on

Speak Your Mind