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:
- Look at your data distribution – are the linked server calls absolutely necessary?
- If the data being referenced is static then consider copying the data to local database and query it there.
- Consider using replication to bring the data local.
- If the data source is some file such as Excel, can you reference it locally instead of over a network connection?
- Is it feasible to import the Excel file into the database?
- 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.
- Have your network admins check over the connection between the server and data source. Is it fast enough?
- OLEDB may be a symptom of another wait type. For example check RESOURCE_SEMAPHORE wait type – is this high?
Leave a Reply