Viewing 15 posts - 20,641 through 20,655 (of 22,224 total)
No doubt you're seeing contention for memory & processor. You'll need to run Perfmon and collect counters on wait times to see what is waiting on what. Where possible (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
April 17, 2008 at 6:11 am
Huh, I'd assume a try catch even on a single row single table update. Even there you could run into deadlocks, whatever, that you want to handle within the TSQL...
"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 17, 2008 at 6:09 am
And how much do you want to bet that they don't have a tested backup in place either... I wish I didn't hate travel so much. I can see why...
"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 17, 2008 at 5:54 am
OOPS! The "correct" answer generates an error.
"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 16, 2008 at 6:52 am
Holy crap! That is some seriously heinous code. Makes you wonder what the database looks like doesn't it?
:sick:
"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 16, 2008 at 6:47 am
If the query is really long and it's creating and loading huge temporary tables, it won't complete the transaction and clear the log of those temporary tables until the context...
"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 16, 2008 at 6:37 am
The problem is, executing a dynamic query like that is creating a different execution context. As soon as that context clears, which happens when the execution finishes, the temporary 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
April 16, 2008 at 6:30 am
Also, for what its worth, you're doing unecessary work, selecting into the temporary table and then selecting from the temporary table. Instead, just use the select statement that would load...
"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 16, 2008 at 6:25 am
Suspended means waiting. Something interrupted the process and it's in a wait state. I'm not that familiar with Access, but from what you're describing, Access is in some manner holding...
"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 16, 2008 at 6:16 am
Either way you go, to ensure that you're getting the exact same result set you need to use ORDER BY to ensure that the 1000 rows you get is 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
April 16, 2008 at 5:44 am
Everything Gail said and look at your execution plan (I'm getting sick of typing that. Anyone have a macro?) to see which indexes have a positive affect and which have...
"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 15, 2008 at 1:49 pm
This looks like a fun one to pile on to
1) A bit field, all by its lonesome, can be a horrible choice for an index (although in rare circumstances as...
"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 15, 2008 at 1:45 pm
Some like this would work. Instead of just the SELECT statement, use that statement with an INSERT statement into the auditing table of choice.
DECLARE @SqlString NVARCHAR(MAX)
DECLARE @DbName NVARCHAR(MAX)
DECLARE MyDatabases CURSOR...
"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 15, 2008 at 7:53 am
Thanks for the reply. Yes, ORM, in this case, meant Object Relational Mapping.
We are talking about new projects and new databases. Although actually, we've had databases and projects running, 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
April 15, 2008 at 7:43 am
Nice. Much better, and I'm sure it performs a lot better.
"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 15, 2008 at 7:34 am
Viewing 15 posts - 20,641 through 20,655 (of 22,224 total)