0

I have this strange issue on one of my DB (SQL Server 2016) in which the activity monitor display duplicates entries in recent expensive query.

enter image description here

In the picture above you can see a snapshot (only two lines) of the Activity Monitor, that display two indentical query (same query text, same execution plan, same target DB) as it was two distinct queries instead of grouping them and incrementing the field execution/min.

What is happening here? it's just an Activity Monitor glitch or should i start to check what's wrong in my DB. I am afraid that the same ORM query (executed two times by differnt request) is not recognized by DB as the same query, and istead it's considered as two different queries, that will degrading performance.

1 Answer 1

1

It may be that the expensive query is part of two different batches and is therefore showing up twice - once as part of each batch.

I have seen similar behaviour in third party SQL Server Monitoring tools.

As a side, activity monitor is just another flaky SSMS GUI. Plan cache tools such sp_blitzcache or SQL Server query store are probably better to get this kind of information

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.