Viewing 15 posts - 18,601 through 18,615 (of 22,219 total)
It looks like you're trying to return a list and a set of counts. You can do this without a cursor:
SELECT [name]
,COUNT([name])
FROM #DISTINCTC
GROUP BY [name]
You might want to pick up...
"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
January 28, 2009 at 4:31 am
mbrady5 (1/27/2009)
I would like to join cwm_cust table to cwm_cut_upload in the following query.. That part I am good with. What I cannot figure...
"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
January 28, 2009 at 4:27 am
It's a pretty low act. I know that when I'm writing I'm scared to death I might string three or four words together in exactly the same way as someone...
"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
January 28, 2009 at 4:11 am
Lynn Pettis (1/27/2009)
"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
January 27, 2009 at 1:26 pm
Uh... Wow... Over-achieve much?
I feel a bit stupid to be commenting on this. I don't have much experience with partitioning beyond reading up on the theory and a few discussions....
"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
January 27, 2009 at 12:54 pm
The single thread on the user app is because the tool using Profiler for the playback. Profiler isn't smart enough to spawn a different process for each SPID as it...
"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
January 27, 2009 at 12:39 pm
Marios Philippopoulos (1/27/2009)
What does that entail? Is it done transparently by the tool or is there anything manual that needs to be done?
When I read about a...
"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
January 27, 2009 at 11:48 am
Yeah, I used it at a lab at the Microsoft Technology Center to test the upgrade of one of our databases. I blogged about it here[/url].
"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
January 27, 2009 at 11:29 am
Lynn Pettis (1/27/2009)
"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
January 27, 2009 at 10:02 am
Steve Jones - Editor (1/27/2009)
Lynn has a good point. Writing coherently, even giving someone a hint 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
January 27, 2009 at 9:59 am
We just need another 60 posts to break 1000. Come on people.
"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
January 27, 2009 at 9:22 am
That's an estimated execution plan. Can you post the actual execution plan? It's especially important to see the estimated vs. actual rows.
On first blush, you might want to put 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
January 27, 2009 at 6:08 am
Yeah, please post the execution plan.
Why would you do this in the GROUP BY clause?
convert(varchar(5),batch.NUM_ORDEM)
I suspect that's going to force a table scan.
"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
January 27, 2009 at 5:32 am
Jeff Moden (1/26/2009)
Grant Fritchey (1/26/2009)
Two possible answers, both will work:TOP
ROW_NUMBER
Simple MAX would do it...
Simple isn't nearly as much fun. Small data set, ROW_NUMBER may perform 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
January 26, 2009 at 9:21 pm
Some operations percentage complete can be obtained through sys.dm_exec_requests. Not everything supplies information to this query, so it really depends on what you're running. But, for example a backup or...
"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
January 26, 2009 at 6:45 pm
Viewing 15 posts - 18,601 through 18,615 (of 22,219 total)