Viewing 15 posts - 8,911 through 8,925 (of 22,219 total)
This stuff is likely killing your performance too. It can't use indexes
DATEPART(dw, d.GREGORIANDATE) <> 1 AND DATEPART(dw, d.GREGORIANDATE) <> 7'
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 14, 2014 at 4:37 am
I've done this using both T-SQL and PowerShell, but the trick is, you have to be able to set up access to a common location. If you can't do that,...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 14, 2014 at 4:32 am
Generally, this is when you go to your backups and restore the database to a point in time prior to the problem.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 14, 2014 at 4:28 am
Evil Kraig F (2/13/2014)
My understanding was the short circuit capabilities of the CASE statement would improve performance, but in a limited variety.
Instead of a simple data change on the table...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 12:25 pm
Recompile will override, yes. You can't really see query hints through the execution plan. You can see them in the SQL text that is stored with the plan.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 9:13 am
OCTom (2/13/2014)
FKs make my job so much easier. I don't have to write the code that prevents orphaned...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 8:46 am
Idera's product works. But it will cause hits to i/o and you will have to have storage available for it, although not initially.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 8:23 am
Cool question and kind of fun. I tested it out this way:
IF (SELECT OBJECT_ID('Test1')
) IS NOT NULL
DROP TABLE dbo.Test1;
GO
CREATE TABLE...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 8:19 am
For just queries... I'd suggest going with Solarwindows (formerly Confio) Ignite. That's one of the best third party tools for just going after query performance. It's not so good with...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 8:05 am
Also, check the cost threshold for parallelism on the server. The default value is 5 and that is radically low for most systems. Changing that to an appropriate value (say...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 8:03 am
A little piling on in this case is good.
I've worked on systems that let the code handle all referential constraints. It failed. Every time. I'm sure it's possible to do,...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 8:01 am
You can open the properties of the first operator of the plan when looking at the graphical plan. That will contain the information about which plan guides have been used,...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 7:49 am
GilaMonster (2/13/2014)
Grant Fritchey (2/13/2014)
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 5:27 am
There are lots of blog posts on DBA interview questions. Just do a search for them.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 3:55 am
The fact that you have four clustered index scans and a heap scan should be a bigger concern than sorting cost. And, what the heck, that's a completely different execution...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 13, 2014 at 3:53 am
Viewing 15 posts - 8,911 through 8,925 (of 22,219 total)