Viewing 15 posts - 20,596 through 20,610 (of 22,219 total)
I don't know about the DBCC thing. Sorry.
It sounds like you've got a CREATE statement inside your procedure definition. That's a problem. You'll need to remove 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
April 23, 2008 at 9:06 am
It really depends on the shop. I've worked where I was the System Administrator, DBA and Developer. Now I work for a largish company where we have 14 DBA's. I...
"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
April 23, 2008 at 8:42 am
Nope. Sorry.
The best you can do is write some code to generate the scripts, but you'll need 25 commands for 25 tables.
"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
April 23, 2008 at 8:21 am
Turning a badly performing query into a stored procedure won't improve performance. You'll need to determine what the query is doing. Is the function being done in the best 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
April 23, 2008 at 8:20 am
If you have to rearrange the columns on the second table, the best way is to drop & recreate the table. Or will that cause issues somewhere else?
Use the MS...
"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
April 23, 2008 at 7:50 am
Excellent points. Very well delivered. You've summarized where I find myself. I think the only real remaining issue I have with my team is that they do want to toss...
"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
April 23, 2008 at 6:52 am
Once you've got the datatype right, it comes down to indexing. I modified your first example to run against AdventureWorks, just so I had something to test:
DECLARE @period DATETIME
SET @period...
"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
April 23, 2008 at 6:45 am
Until you're down to squeezing the last 10-20ms out of a query, I don't think it matters. COALESCE has a lot more flexibility than ISNULL, so, I'd say, if you...
"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
April 23, 2008 at 6:25 am
I don't think there is one that tracks connections historically. If you really don't want to run Profiler, you might try running queries against sys.dm_exec_query_stats and see if any queries...
"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
April 23, 2008 at 6:19 am
Without everything that Gail asked for, answering this is tough, but it looks like you've got that SELECT statement as part of your initial SELECT statement. Move it into your...
"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
April 23, 2008 at 5:29 am
Excellent information. Thank you very much.
"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
April 22, 2008 at 1:01 pm
Or even go ahead and start developing against SQL Server 2008. It's going to take you a few months to build an application that will host millions of users, so...
"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
April 22, 2008 at 12:36 pm
Damn straight I'm not sure what I'm getting into.
I recognize the issue that ORM tools are attempting to solve. I acknowledge that the various tools I've investigated do a pretty...
"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
April 22, 2008 at 11:16 am
While the optimizer might choose to sort & join using the index on the first table, it can't use the index on the first table to access the data on...
"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
April 22, 2008 at 10:47 am
What everyone else has said plus, assuming an OLTP system, you're avoiding scans, bookmark lookups (key lookups) and ineffecient joins in the queries. Assuming a reporting system, you're avoiding scans...
"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
April 22, 2008 at 8:36 am
Viewing 15 posts - 20,596 through 20,610 (of 22,219 total)