Tuning for SQL Server OLEDB Wait Types

7
Tuning for SQL Server OLEDB Wait Types Confio Software 08/24/2022 1

description

The SQL Server OLEDB wait type indicates that the query is waiting on something external to the SQL Server instance. Tuning the query will involve tuning what is being accessed.

Transcript of Tuning for SQL Server OLEDB Wait Types

Page 1: Tuning for SQL Server OLEDB Wait Types

04/10/2023 1

Tuning for SQL Server OLEDB Wait Types

Confio Software

Page 2: Tuning for SQL Server OLEDB Wait Types

04/10/2023 2

SQL Server OLEDB Waits

• Indicates that a SPID:– has made a function call to an OLE DB provider– Is waiting for the function to return the required data

• May also indicate that the SPID is waiting for:– remote procedure calls– linked server queries– BULK INSERT commands – full-search queries

• Waiting on something external to SQL Server instance

Page 3: Tuning for SQL Server OLEDB Wait Types

04/10/2023 3

What is OLE DB?

• Microsoft OLE DB (Object Linking and Embedding, Database) is an API for uniformly accessing different types of data– Implemented using the Component Object Model

(COM) (otherwise unrelated to OLE)– Designed as a higher-level replacement for, and

successor to, ODBC• Allows extension of features to non-relational

databases and spreadsheets that are not SQL-based

Page 4: Tuning for SQL Server OLEDB Wait Types

04/10/2023 4

How Microsoft OLE DB works

• OLEDB separates the data store from the application that needs access to it – Done through abstractions, including the datasource,

session, command and rowsets• OLEDB enables applications to access varying types

and sources of data • OLE DB is part of the Microsoft Data Access

Components (MDAC) stack (group of Microsoft technologies that interact together as a framework) – Gives programmers a consistent way of developing

applications for accessing almost any data store

Page 5: Tuning for SQL Server OLEDB Wait Types

04/10/2023 5

Understanding Microsoft OLE DB consumers and providers

• OLE DB is conceptually divided into consumers and providers– Providers can be used to access simple data stores (text files and

spreadsheets), complex databases (for example Oracle, SQL Server, Sybase ASE) or hierarchical datastores (for example, email systems)

• In the case of the OLEDB wait type:– the consumer of the data is SQL Server – the provider is the software component that implements the

interface and provides the data to the consumer• When the SQL Server database is waiting for an external

system to respond to an OLEDB request, the OLEDB wait type is the result– Indicates primarily that the query is waiting on something outside

of the SQL instance

Page 6: Tuning for SQL Server OLEDB Wait Types

04/10/2023 6

Tuning for OLEDB Waits

• Tuning for this wait type involves tuning what is being accessed (the provider) – For example, if what’s being accessed is a spreadsheet, then tune the spreadsheet

• Check placement of client application, including any file input read by the client and SQL Server data and log files

• Check Disk secs/Read and Disk secs/Write. If Disk secs/Read is high:– Add additional I/O bandwidth– Balance I/O across other drives– Put the database and transaction log on their own drives

• Inspect Transact-SQL code for RPC, Distributed (Linked Server), and Full Text Search – Although SQL Server supports these kinds of queries, they can cause bottlenecks

• Try tuning the other wait types that are occurring at the same time– For example, if RESOURCE_SEMAPHORE waits are occurring at the same time, review

the amount of memory being used either by concurrent requests or bad queries

Page 7: Tuning for SQL Server OLEDB Wait Types

04/10/2023 7

Find Root Cause of Waits Quickly with Confio Ignite

• Improve database performance by 65% with Confio Ignite– Identify bottlenecks and root causes of waits like

these in minutes– Installs in minutes– Puts no load on monitored servers

Download Ignite trial for freewww.confio.com/freetrial