28,280 reputation
771121
bio website
location United Kingdom
age
visits member for 3 years
seen 5 hours ago

Email: stackoverflowmartinsmith@gmail.com


Jun
25
comment When to use TINYINT over INT?
@GeorgeShouse Demonstration of that here
Jun
23
comment Changing Databases Dynamically using Variables
Related SO question. stackoverflow.com/q/727788/73226
Jun
23
comment Changing Databases Dynamically using Variables
@Max No. The scope gets reset when the exec finishes. So you end up back where you started. To use this approach all your remaining code would also need to be appended after the use.
Jun
22
revised SQL Server: Are there any performance benefits from indexing a table <8kb in size?
added 41 characters in body
Jun
22
answered SQL Server: Are there any performance benefits from indexing a table <8kb in size?
Jun
22
comment Reporting Services buttons show up one under the other instead of side-by-side
Looks like you need to install up to at least SP1 CU8 or hack around with some files
Jun
20
comment Improve query performance when selecting almost all rows with many “group by” columns
Also, you haven't told us anything about what is consuming these rows. Are they being sent over the network? If running in SSMS how long does it take if you enable the "discard results" option?
Jun
19
revised What's the difference between a temp table and table variable in SQL Server?
Hopefully explained better and updated Mr White's moniker!
Jun
19
comment What's the difference between a temp table and table variable in SQL Server?
Found it from @PaulWhite here sqlblog.com/blogs/paul_white/archive/2012/08/15/… There is another condition not listed above. If the table is empty at compilation time, RT is set to 1.
Jun
19
comment What's the difference between a temp table and table variable in SQL Server?
@AaronBertrand I'm sure I read about this before somewhere but I don't see it in either of the plan caching white papers.
Jun
19
comment What's the difference between a temp table and table variable in SQL Server?
@AaronBertrand Yes, agree that I missed the n=6 one. I do definitely see that if n=0 even the addition of a single row causes a statement level recompile and an adjustment to the TableCardinality shown in the plan though.
Jun
18
reviewed Edit suggested edit on SQL query slow-down from 1 second to 11 minutes - why?
Jun
18
revised SQL query slow-down from 1 second to 11 minutes - why?
added 1 character in body
Jun
17
awarded  Nice Question
Jun
17
awarded  Generalist
Jun
17
comment Sequence is reusing
@AaronBertrand And the Connect Item doesn't have many votes so presumably can't be a common issue.
Jun
16
comment Sequence is reusing
What is @@VERSION? Also has anything changed about the environment? There is a connect item reporting something similar. The OP there reckons it was associated with 11.0.3000.0
Jun
16
comment Rejoining range seek on nullable composite index?
Thanks. That's a new one for me!
Jun
16
accepted Rejoining range seek on nullable composite index?
Jun
15
comment Rejoining range seek on nullable composite index?
@ypercube - Did you see the extension to my question? I think you may be describing the same thing? In which case simpler syntax, simpler looking plan superficially with a single seek operator but actually that seek operator still ends up performing two separate seeks to retrieve the A =@A AND B>@B then the A > @A so that makes me think it won't ever actually give me the plan I originally wanted with a single seek and a contiguous scan.