0

This question already has an answer here:

I have an SQL Server instance running on AWS RDS that is performing badly. A query that usually takes milliseconds to run, is taking minutes, causing my application to time out. This particular query SELECTs from a table which has 50000+ rows, but it only returns 100 rows (with a SKIP/TAKE parameter). I managed to replicate the problem on SQL Server Management Studio, so it's not an application problem.

When I reboot the instance, the problem is gone. But it comes back randomly within a few days. What could it be? And how can I troubleshoot it?

Environment details:

  • Engine version: 14.00.3049.1.v1 (SQL Server 2017 - Express)

  • Instance class: db.t2.micro

  • vCPU: 1

  • RAM: 1 GB

marked as duplicate by MDCCL, Erik Darling sql-server May 7 at 20:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • If you can replicate it reliably, can you see if the execution plan is different between a "fast" run and a "slow" run? – Jonathan Fite May 7 at 20:37