Viewing 15 posts - 11,221 through 11,235 (of 22,224 total)
Or just perform the MAX statement as a derived table (same thing as a CTE) and join to that. In this situation a CTE just changes the location of defining...
"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 19, 2012 at 7:21 am
Frankly, if I want to see code formatted my way, I just hit the CTL-K followed by CTL-Y.
"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 19, 2012 at 6:59 am
Except for the formatting, that code looks decent. If you want bad examples of TSQL from Microsoft you need to dig through the Books Online a little. There are several...
"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 19, 2012 at 6:31 am
Evil Kraig F (3/15/2012)
Grant Fritchey (3/15/2012)
GSquared (3/15/2012)
"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 15, 2012 at 5:06 pm
GilaMonster (3/15/2012)
Grant Fritchey (3/15/2012)
"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 15, 2012 at 4:26 pm
GSquared (3/15/2012)
"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 15, 2012 at 1:43 pm
Jack Corbett (3/15/2012)
herladygeekedness (3/15/2012)
"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 15, 2012 at 12:56 pm
jcrawf02 (3/14/2012)
I won't get to meet him for a few months still, but very excited!
So now the important question is, do we let him watch Star...
"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 14, 2012 at 11:51 am
Steve Jones - SSC Editor (3/13/2012)
I'd like to think that we aren't "parenting" newbies like this: http://online.wsj.com/article/SB10001424052702304450004577277482565674646.html?mod=wsj_share_tweet (about 15 paras in)
WOW! Well, that's not my house. Last time I asked...
"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 13, 2012 at 3:52 pm
sys.dm_exec_query_stats will show you an aggregate of all the calls against the database for the queries still in cache. I suspect that's what you need.
Otherwise, you can use sys.dm_exec_requests to...
"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 9, 2012 at 7:47 am
It really depends on the query. I had one that took 3 minutes to compile but ran in about 500ms. It was an abnormal situation (86 table join), but easily...
"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 9, 2012 at 6:06 am
Dave Ballantyne (3/7/2012)
havent been around 'the thread' for a while, and only dipped in and out of SSC, been a bit busy :ermm:
Im running a lunch time user group...
"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 7, 2012 at 4:08 pm
try pulling up an estimated plan to see what it's trying to do. Then you can compare the good execution with the bad one.
"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 27, 2012 at 9:54 am
D.Oc (2/26/2012)
Grant Fritchey (2/25/2012)
Wow! That's great. The job I have currently was the only one that seemed aware I had written anything on the subject of SQL Server (except one...
"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 26, 2012 at 5:39 am
Lynn Pettis (2/25/2012)
Grant Fritchey (2/25/2012)
Lynn Pettis (2/24/2012)
"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 25, 2012 at 3:17 pm
Viewing 15 posts - 11,221 through 11,235 (of 22,224 total)