Debugging slow SQL Server performance with SQL Profiler
3
votes
1
answer
1321
views
I have been debugging an issue in our production environment(on-premises) where queries perform slowly even the columns are indexed. The table has roughly 200 million rows, is not partitioned and is in full recovery mode.
The DELETEs only affects 1 row and INSERTs are only 1 row too.
I can see the duration in SQL Profiler, but it occurs during Audit Logout which I don't understand. For example the DELETE on top of the picture seems to take 0ms to run, but the Audit Logout takes 2867ms and it also has huge amount of reads. I have monitored the DB with PerfMon, but cannot see any related I/O or CPU issues.
Does it make sense that DELETE or INSERT with such a table could take seconds? Would anyone have an idea what is causing the latency?

Asked by Joni
(33 rep)
Apr 2, 2023, 07:35 AM
Last activity: Apr 2, 2023, 01:03 PM
Last activity: Apr 2, 2023, 01:03 PM