Viewing 15 posts - 8,596 through 8,610 (of 22,219 total)
roblew 15918 (3/21/2014)
GilaMonster (3/21/2014)
EXECUTE <procedure name> WITH RECOMPILE will generate a new plan just for this execution, the generated plan won't be cached and the cached plan won't be affected.
Thanks,...
"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
March 21, 2014 at 11:30 am
Backing up Gail, piling on and reinforcing this one.
REPAIR_ALLOW_DATA_LOSS is extremely dangerous. It will attempt to fix the database without any regard to your data at all. You could lose...
"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
March 21, 2014 at 10:19 am
If you don't mind spending a little money, Red Gate SQL Prompt[/url] is a tool that I can't live without. It formats your code. And it provides code completion way...
"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
March 21, 2014 at 10:15 am
If, logically, you need all the rows from one table, but only the matching rows from another table, then some type of OUTER JOIN is necessary. They're not inherently evil.
"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
March 21, 2014 at 10:12 am
VMs are pretty solid and work quite well. Just as well as physical machines these days if they're properly set up and maintained. But, performance could be an issue there...
"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
March 21, 2014 at 10:10 am
Other than what Gail outlines, which is a good way to get a new plan every time, why are you trying to "ignore the cache"?
"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
March 21, 2014 at 10:07 am
Can you tell what is slowing down the inserts? I mean other than the obvious, this index sucks. What does the execution plan look like? What are the wait stats...
"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
March 21, 2014 at 6:07 am
I'm curious what you mean by administration commands? Except for the direct manipulation of data within the tables (and even that) almost every single command is going to be an...
"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
March 21, 2014 at 5:13 am
If it's integer data, use the integer data type. Done.
Numbers in general are stored basically the same way within SQL Server. The only differences really are in the size and...
"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
March 21, 2014 at 5:10 am
Rebuilding the log file requires that no open transactions exist in the database. Try deleting the log file and attaching the database without the log. It might not work, but...
"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
March 20, 2014 at 4:31 pm
Take a look at the estimated execution plan. It will tell you the choices SQL Server is making based on the code you provided and the statistics available on the...
"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
March 20, 2014 at 4:26 pm
Yeah, it also checks the file locations.
You need to do this:
RESTORE DATABASE MyNewDatabase
FROM DISK = 'x:\mybackupfile.bak'
WITH MOVE 'MyLogicalFileName' = 'd:\data\MyNewDatabase.mdf',
MOVE 'MyLogicalLogFileName' = 'e:\logs\MyNewDatabase.ldf';
You need to put in your appropriate paths...
"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
March 20, 2014 at 4:21 pm
It has to be either duplicate data or NULL values. With a unique index you can have a single NULL value. As was stated, with a primary key, you can't...
"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
March 20, 2014 at 4:16 pm
Rebuilding the index defragments the index, yes.
"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
March 20, 2014 at 4:13 pm
There's a bunch of stuff that's been on the deprecation list that's still not quite gone. Profiler and Trace Events are the big ones I'm curious about.
"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
March 20, 2014 at 4:10 pm
Viewing 15 posts - 8,596 through 8,610 (of 22,219 total)