29,768 reputation
874126
bio website
location United Kingdom
age
visits member for 3 years, 3 months
seen 1 hour ago

Email: stackoverflowmartinsmith@gmail.com


2d
comment Multiply operation/field causing the record set to 'ungroup'?
Without an ORDER BY you can't expect any particular order.
2d
revised Multiply operation/field causing the record set to 'ungroup'?
added 222 characters in body
2d
awarded  Notable Question
Jan
20
revised Is table aliasing a bad practice?
added 138 characters in body
Jan
18
comment Design: how to store lots of booleans?
What RDBMS are you using? What type of queries do you need to do against this data?
Jan
17
comment Update all rows
As far as I understand it adding a new not null column with a default is a metadata only change in Oracle. I doubt they will have optimised the "update all rows to the same value" case. Is this a common operation for you?
Jan
16
comment find all numbers that appear at least three times consecutively
MySql doesn't support windowed aggregates.
Jan
15
comment Would it be better for query plans to be split by statement for re-usability?
dbid and objectid both have is_cache_key=1 so you won't get any reuse of plans between different compiled objects.
Jan
14
awarded  Nice Question
Jan
13
awarded  Famous Question
Jan
13
revised meaning of ## in SQL Server Profiler trace data
added 10 characters in body
Jan
12
reviewed Approve Distinct count of 5 different fields based on multiple values?
Jan
12
comment Performance of query with complex where clause on 10M rows
What version of SQL Server are you on?
Jan
11
revised Using DISTINCT in window function with OVER
added 160 characters in body
Jan
11
answered Using DISTINCT in window function with OVER
Jan
11
revised Using DISTINCT in window function with OVER
FIx for if A is nullable
Jan
11
revised Is NOLOCK always bad?
added 439 characters in body
Jan
10
comment How can I make this query sargable?
Thanks. I see it now!
Jan
10
comment How can I make this query sargable?
Ah Ok. I'm sure you're right but I don't see the translation to 0x either though. It just gets translated to the next rowversion column as far as I see. 0x00000000000007D9, 0x00000000000007DA, 0x00000000000007DB
Jan
10
comment How can I make this query sargable?
Regarding the "when not nullable, varbinary(8) otherwise" is it possible to get this to happen? If I try and create a nullable timestamp column and insert an explicit NULL it still doesn't end up as NULL. The column also ends up in the fixed length data part of the row. CREATE TABLE #T (A TIMESTAMP NULL,B INT,C INT);INSERT INTO #T VALUES (NULL,1,1);SELECT * FROM #T;DROP TABLE #T;