29,316 reputation
772123
bio website
location United Kingdom
age
visits member for 3 years, 2 months
seen 12 hours ago

Email: stackoverflowmartinsmith@gmail.com


Dec
8
revised Query to convert the count to million or thousands
added 732 characters in body
Dec
8
revised Query to convert the count to million or thousands
added 94 characters in body
Dec
8
answered Query to convert the count to million or thousands
Dec
8
comment Estimated rows very wrong when using declared variables
Those are variables not parameters.
Dec
8
revised What is the difference between <> All and Not In
added 22 characters in body
Dec
7
answered Reset Key Names to Defaults?
Dec
7
reviewed Reviewed How to efficiently check EXISTS on multiple columns?
Dec
7
comment How to efficiently check EXISTS on multiple columns?
Even if this is valid in any other DBMS I doubt it has the correct semantics. Assuming that T.B is null is treated as a boolean result then EXISTS(SELECT true) and EXISTS(SELECT false) would both return true. This MySQL example indicates that both columns contain NULL when neither in fact do
Dec
7
reviewed Looks OK Help improving this query using IN
Dec
7
reviewed Looks OK Removing Secondary Replica from SQL Availability Group Causs Large Log File
Dec
7
reviewed Looks OK Removing Databases in Recovery Pending Status after AG group was removed
Dec
7
reviewed Reopen Using sp_BlitzIndex - Diagnosed as “Index Hoarder: Addicted to nulls”
Dec
7
reviewed Approve OS Paging too high in sql server
Dec
3
comment What significance does an index_id < 256000 have?
@AaronBertrand - and also in sys.selective_xml_index_paths, sys.xml_indexes, sys.sysindexes but I suppose these will just get updated if the magic number is no longer valid.
Dec
3
comment What significance does an index_id < 256000 have?
Maybe they copied the code from sys.sysindexkeys
Nov
30
revised why is my trigger called even when the underlying table didn't change?
added 466 characters in body
Nov
30
comment Simulate more RAM with SQL Server
Not something I've tried myself but MemoryMBs is a param for dbcc OPTIMIZER_WHATIF. Also see devondba.blogspot.co.uk/2014/03/dbcc-optimizerwhatif.html
Nov
30
awarded  Nice Answer
Nov
22
comment Quirk update for cumulative sum of chances for a raffle. What can go wrong?
Agree with @usr. This question as it stands is unlikely to get an answer that does any more than copy Jeff's extremely time consumingly researched conclusions. You're better off posting your table structure, exact requirements, and asking how the requirements can be achieved efficiently.
Nov
22
comment Quirk update for cumulative sum of chances for a raffle. What can go wrong?
Have you read the Jeff Moden article on SQL Server Central where he lists the "rules"? Certainly I have seen this fail in the wild when the query got a parallel plan.