Reputation
33,553
Next tag badge:
508/400 score
72/80 answers
Badges
8 87 147
Newest
 sql
Impact
~1.1m people reached

Jun
22
awarded  Nice Question
Jun
22
revised Why does referencing a variable in a join predicate force nested loops?
added 184 characters in body
Jun
22
comment Why does referencing a variable in a join predicate force nested loops?
Found it. The fix appears from SQL Server 2005 SP3 CU7.
Jun
22
comment How do I determine the cause of a very small table responding to queries slowly?
Does this table get frequent updates that would cause blocking?
Jun
22
revised Why does referencing a variable in a join predicate force nested loops?
added 8 characters in body
Jun
21
comment Why does referencing a variable in a join predicate force nested loops?
@Ionic - OPTION (QUERYTRACEON 4199); does allow it to be turned on on a per query basis.
Jun
21
accepted Why does referencing a variable in a join predicate force nested loops?
Jun
21
comment Why does referencing a variable in a join predicate force nested loops?
@TomV - Yep. 4199 seems to solve the problem. I should have tested that. Thanks. Just looking to see if the specific fix is documented somewhere...
Jun
21
asked Why does referencing a variable in a join predicate force nested loops?
Jun
20
answered Why isn't the primary (clustered) key being used in this query?
Jun
20
comment Accidentally change database name (SQL Server 2008)
The data isn't displayed from this query in plain text. Would need to cast it to readable form with something like SELECT CAST([RowLog Contents 0] AS sysname) ,CAST([RowLog Contents 1] AS sysname) FROM sys.fn_dblog(NULL,NULL) WHERE Context = 'LCX_BOOT_PAGE' AND [Offset in Row] =52
Jun
20
answered In SQL Server Mgmt Studio, why don't triggers automatically get updated when tables get renamed?
Jun
20
comment Why isn't the primary (clustered) key being used in this query?
The clustered index is partitioned on ReadTime so it couldn't use the PK as you describe. It would need to find the Max(Id) for each partition and then find the max of those. It is possible to rewrite the query to get such a plan as alluded to here though dba.stackexchange.com/a/99418/3690
Jun
16
comment Why does SQL Server 2005 only use an IS lock in this scenario?
sqlblog.com/blogs/paul_white/archive/2010/11/01/…
Jun
15
revised How do I read Query Cost, and is it always a percentage?
added 85 characters in body
Jun
8
awarded  Enlightened
Jun
8
awarded  Nice Answer
Jun
5
awarded  Enlightened
Jun
5
awarded  Nice Answer
Jun
2
awarded  Enlightened