All Questions
Tagged with tuning sql-server
24 questions
0
votes
1
answer
539
views
AI Tools for Tuning SQL Server? [closed]
Are there any strong and accurate AI-based utilities out there that can help identify problems with and suggest better-tuned alternatives for deficient queries, and that can analyze and provide useful ...
0
votes
1
answer
916
views
How does different forms of EXISTS() affect performance in MS Sql Server?
I've been told that when checking for the existence of a row in a table, this will work:
EXISTS(SELECT 1 FROM....)
but that a "better" way in regards to speed performance of the query would ...
3
votes
1
answer
880
views
Index usage Brent Ozar script
I'm using sp_blitzIndex to check the health of my database indexation, but I don't understand every column used in the output.
I'm talking specifically about "Usage Stats" and "Op Stats&...
3
votes
1
answer
133
views
Save CPU cycles on SQL Server Query Plans (Better without Stats than with on wide tables)
Assume that a query in question has a very wide set of columns. The query looks like the following:
set statistics io,time on;
Select a.Col1, a.Col2, b.Col3, b.Col4, c.Col5
From FirstWideTable a
...
4
votes
2
answers
5k
views
Which Plan is Better? WHERE EXISTS Instead of INNER JOIN
Did a switch to a WHERE EXISTS in temp table (Object13 in the plans) from an INNER JOIN to said temp table in final select in procedure.
Logical reads plummeted, but plan cost and memory ...
2
votes
1
answer
8k
views
Timeout expired error. Is it because of a query or server settings?
I am getting SQL Server timeout error in my production server, every hour
(~ for 5 minutes or more) during night time. This SQL server database is supporting a .NET application. I have scheduled an ...
2
votes
1
answer
601
views
sp_BlitzIndex -- 'High value" vs 'High Impact' [closed]
Sorry, I may be missing something super-obvious here, but I've googled this and asked some colleagues and am not finding a satisfactory answer.
I've been using sp_BlitzIndex for a few months now ...
2
votes
1
answer
218
views
Ideas how to make this query faster?
I have the following query:
SELECT TabPohybyZbozi.ID,
TabPohybyZbozi.NazevSozNa2,
TabZakazka.Nazev,
TabDokladyZbozi.DatPorizeni,
TabPohybyZbozi.IDDoklad
FROM ...
0
votes
1
answer
314
views
Database Engine Tuning Advisor
I analysed a huge query in DTA. The database is kind of badly designed and does not have primary keys on tables, also they dont have clustered indexes on them. I found around 80 tables as such. Now, ...
12
votes
2
answers
29k
views
Sql Server, Is "Reorganize Files Before Releasing Unused Space" better or worse?
I could not find a satisfactory answer. I fully understand that "Shrink" will cause index defragmentation, and that can worsen performance.
But, is not this option to reduce defragmentation?
So, to ...
2
votes
1
answer
2k
views
Table valued function VS Stored procedure
There's a function that :
returns only 1 row
has only 1 parameter
has multiple joins on different tables, each only to return a single scalar value
is called only once at each login of a web ...
1
vote
1
answer
259
views
Should I ever use query hints?
SQL Server 2008 R2, Dynamics AX 2009
We have this ugly query
DECLARE @P1 NVARCHAR(5), @P2 INT, @P3 INT, @P4 NVARCHAR(11), @P5 INT, @P6 NVARCHAR(5), @P7 NVARCHAR(11)SELECT A.SALESID,
A.LINENUM,
...
7
votes
4
answers
4k
views
Hash Match inner join in simple query with in statement
I am running the execution plan for the following query:
select m_uid from EmpTaxAudit
where clientid = 91682
and empuid = 42100176452603
and newvalue in('Deleted','DB-Deleted','Added')
Here is ...
0
votes
1
answer
903
views
Same query same data different server different query plan
I have a query that hits a view, which references other views etc...several levels down. The query plan is a bit complex.
I run the query on 2 different servers. On both servers, the number of rows ...
3
votes
1
answer
170
views
Sort operation SQL Server 2012
I am trying to optimize a query and the sort operation (91% cost) is the costliest operation. Any help will be appreciated.
Query is :
SELECT TOP 1
ArchiveType,
CONVERT(NVARCHAR(30), A....