Are They a Problem?
They are the time spent inside external providers. Small amounts come with any linked server use. When the family becomes prominent, sessions are spending real time in provider code, and PREEMPTIVE_COM_GETDATA leading the family points at the data fetch: a slow remote source, or too much data crossing the link. Get Wait Statistics does not filter them out.
What It Means
Microsoft lists the PREEMPTIVE_COM_* waits as internal use only. Each is a thread in preemptive mode waiting for a method on a COM object to return, and for a DBA that object is almost always the OLE DB provider behind a linked server, OPENQUERY or OPENROWSET. The names follow the method being called:
PREEMPTIVE_COM_GETDATA: fetching row data from the provider.PREEMPTIVE_COM_QUERYINTERFACEandPREEMPTIVE_COM_COCREATEINSTANCE: finding and creating the COM object, the setup cost.PREEMPTIVE_COM_CREATEACCESSOR,RELEASEACCESSORandRELEASEROWS: managing the rowset around the fetch.PREEMPTIVE_COM_SEQSTRMREAD: reading a sequential stream from the external source, for example anOPENQUERYagainst Oracle.
Other provider waits outside the prefix, such as PREEMPTIVE_OLEDB_SETPROPERTIES and PREEMPTIVE_CREATEPARAM, cover provider properties and parameters.
When It Does Matter
When they rank, find the calling queries while it is happening, and the providers involved:
SELECT
r.session_id,
r.wait_type,
r.wait_time AS wait_ms,
s.login_name,
s.program_name,
t.text AS running_sql
FROM sys.dm_exec_requests AS r
JOIN sys.dm_exec_sessions AS s ON s.session_id = r.session_id
OUTER APPLY sys.dm_exec_sql_text(r.sql_handle) AS t
WHERE r.wait_type LIKE N'PREEMPTIVE_COM_%'
ORDER BY r.wait_time DESC;
The baseline to monitor is the family’s wait time per interval next to linked server activity. To bring it down, move less data across the link: push filters and joins to the remote side, fetch only the columns you need, large object columns especially, and tune the remote query as its own job. Read these with OLEDB and MSQL_DQ, which cover the same linked server calls from other angles. The query needs VIEW SERVER STATE.
The PREEMPTIVE Family
Each of these is SQL Server calling out of its own scheduler into something else, such as COM, MSDTC or an OLE DB provider, and waiting for the answer. The time is spent outside SQL Server. If one is near the top of your waits, read it next to the waits that usually matter.
- PREEMPTIVE_DTCDistributed transactions. Calls into MSDTC to begin, enlist in, commit or abort a distributed transaction.Worth a look when it climbs
- PREEMPTIVE_OLEDBOPSOLE DB providers. Talking to an OLE DB provider, usually behind a linked server.Worth a look when it climbs
- PREEMPTIVE_COMCOM calls. Calls into COM objects, usually the OLE DB providers behind linked servers.Worth a look when it climbs. This page.
- PREEMPTIVE_XEExtended Events. Extended Events session and target calls outside SQL Server.Usually noise
- PREEMPTIVE_SP_SERVER_DIAGNOSTICSHealth checks. The background thread running sp_server_diagnostics.Usually noise
- PREEMPTIVE_SB_STOPENDPOINTBroker endpoint. Calling out to Windows while a Service Broker endpoint shuts down.Usually noise
Where To Go Next
If the PREEMPTIVE_COM waits are sitting near the top of your wait stats, these are the next places to look.
- OLEDB, the linked server wait from the SQL Server side.
- Get Linked Servers, the linked servers and providers on the instance.
- The waits that usually matter, ranked, with what each one is telling you.
- Performance & Troubleshooting, the scripts and guides for this part of the stack.
Leave a Reply