EF Core 3.1 query sometimes is superfast but sometimes is slow

Viewed 752

I am using EF Core 3.1 with sql server 2019 Developer Edition I have a complex select query with multiple includes which 90% percent is very fast (avg 200ms) but sometimes it becomes slow (sometimes takes up to 25 seconds) for the same parameters.

I have read about parameter sniffing in sql server but I don't know how to identify if this is the case that slows down the query. How can I check if this is the case?

1 Answers

I have read about parameter sniffing in sql server but I don't know how to identify if this is the case that slows down the query. How can I check if this is the case?

Turn on the SQL Server Query Store. Monitoring performance by using the Query Store

Related