Linked Questions

1
vote
0answers
334 views

Poor Query performance when scalar variables used in Query [duplicate]

Facing a strange issue that a query runs incredibly slow (worse) when scalar variables are used as parameter. Actual Query (Faster) - 9 secs select sum(v.sale_value) as col_0_0_, sum(v.vat_value)...
0
votes
0answers
33 views

SQL Server query extremely slow. It fixes itself after rebooting [duplicate]

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 ...
0
votes
0answers
25 views

I have a stored procedure running fine before 4PM every day. After that it runs like a dog [duplicate]

I have a stored procedure running fine before 4PM every day. After that it runs like a dog. I identified which query inside the sp caused the problem. In a good run, the logical IO is about 12 ...
0
votes
0answers
19 views

Multiple Ad-Hoc Statements taking longer than previous days [duplicate]

We have a Data Warehouse product which runs a number of ad-hoc (IE SQL Text, not stored procs or dynamic SQL) every night. The build took significantly longer last night than previous nights and ...
0
votes
0answers
15 views

any knowledge or experience with dynamic ax [duplicate]

I support a system called "dynamics ax" and sometimes my optimizer picks a good plan, drops it and then picks a bad plan (where the same code is been ran). users who usually wait for 10 seconds start ...
4
votes
1answer
129 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 ...
1
vote
1answer
118 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 ...
0
votes
0answers
229 views

SSIS package Job problem

I have an SSIS package that loads data nightly from a warehouse to a database. Both the SSIS and SQL Server agents are on SQL server 2012 Enterprise and Windows Server 2012 R2 Standard. When I run ...
0
votes
0answers
168 views

EF Query as RPC - is it parameter sniffing?

Somewhat similar to this -- Why does sp_executesql use a different query plan? -- i.e. a C# app, using EF to SQL, but with a much simpler query. Here's the sample, as captured by Profiler and XEvents:...
1
vote
2answers
104 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 ...
0
votes
0answers
117 views

In what scenario would I suddenly need to recompile a Stored Procedure (SQL Server 2014 ENT)

I had an issue where a remote procedure call (from .net) for a specific parameterized stored procedure suddenly would end in a time out. This was the case for only some parameters being set not all. (...
2
votes
0answers
76 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 ...
1
vote
1answer
74 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 ...