Linked Questions

12 votes
1 answer
934 views

Is this a symptom of an overloaded server?

I've been trying to diagnose slow-downs in an application. For this I've logged the SQL Server extended events. For this question i'm looking at one particular stored procedure. But there are a ...
Ian Boyd's user avatar
  • 976
7 votes
2 answers
539 views

Force SQL Server to use fragmented indexes?

I have a quite large table (>10M rows) with frequent crud operations. It has proper indexes, but they get fragmented quickly. Without a periodic index reorganize/rebuild maintenance plan, the index ...
mikaelnet's user avatar
  • 173
5 votes
1 answer
2k views

Understand why the query plan was changed [duplicate]

We had some performance issues with our ERP system. Somewhere around 06:00 the problem started. Long story short; one of my colleagues executed a DBCC FREEPROCCACHE (I know that this is not a ...
Niels Broertjes's user avatar
5 votes
1 answer
1k views

SQL Server - Very high disk activity after running query?

I'm running SQL Server Express 12.0.4100 on an AWS instance with 16 cores and 64 GB of RAM with a 3TB and 9000 IOPS EBS attached. This has been running for 2 years perfectly with no issues until this ...
Andres's user avatar
  • 183
4 votes
1 answer
683 views

How to find inputs that caused different query plans in Query Store

Query store shows that a completely parameterized query has multiple query plans: How can I find the input that is causing such long response times? Why would the same parameterized query end up ...
Vlad's user avatar
  • 143
3 votes
0 answers
261 views

Execution Plan changes between good and bad query plans (Azure SQL Server)

I've done my best to follow Why is my query suddenly slower than it was yesterday? The ShowPlanXML parses fine with SQL Sentry Plan Explorer but not via brentozar.com/pastetheplan (not sure why) so I ...
Vince's user avatar
  • 175
2 votes
3 answers
523 views

Critical query plans removed from sys.dm_exec_query_stats while trivial items are kept [duplicate]

Running SQL Server Express 2019. Have a complicated stored procedure containing 11 sql statements (when selected from sys.dm_exec_query_stats by plan_handle). 9 of those statements are simple variable ...
roman m's user avatar
  • 125
2 votes
2 answers
655 views

Example of query execution plan where the cardinality estimation makes a difference

I am trying to create an example of a query execution plan which shows that if I have the cardinality estimation for some column of a table I can decide which query execution plan has the least cost. ...
Felipe's user avatar
  • 161
2 votes
1 answer
426 views

Some timeout in query store but get all SP:Starting and SP:Completed in profiler

I have a report SP running. The user complaint report timeout sometimes. And I do get some canceled execution plan in my query store. But in my profiler tracing file, every SP:Starting has its SP:...
DBALUKE HUANG's user avatar
2 votes
1 answer
938 views

Changing stored procedure parameter results slow stored procedure performance

I have a stored procedure to fetch all users in the database. To do this it queries a view which is composed on two tables: Users (holds basic info like username) and UserPortals (maps users to ...
mjones's user avatar
  • 21
2 votes
0 answers
87 views

Problem query - execution plan

I have a problem with a long running query, I'm not a DBA but it's become my problem. I've been doing a lot of reading over the last few weeks but for the life of me can't figure out why this query is ...
SomeoneEls's user avatar
1 vote
3 answers
2k views

Slow query in production, bad execution plan or bad index?

I've just fixed a production performance issue by dropping an index and recreate it. I suspect dropping the index also dropped executions plans that used it and one of them happen to be bad. Arguments ...
AXMIM's user avatar
  • 111
1 vote
1 answer
391 views

Parameter Sniffing - Running query in code vs in management studio

I just had a problem at work where a stored proc, being called by some C# code, was very slow. When I ran the same stored proc with the same parameters in Management Studio, it was very fast. After a ...
Patrick958's user avatar
1 vote
1 answer
273 views

Find outlier statistic in SQL server?

I have a stored proc which searches "bad" data in our application database (sql server 2016 enterprise, ~500gb data). "bad" in a business/process sense. It normally takes 10-30s to execute. After ...
fabsenet's user avatar
  • 113
1 vote
2 answers
684 views

Query execution time is random, need to identify the root cause

I have a query like below select * from table1 where column2=123 and column3='B' Now the issue faced by us is that this query is executing very slowing sometimes as seen in our performance tracking ...
pranjal thakur's user avatar

15 30 50 per page