18,307 reputation
453102
bio website sqlperformance.com/author/…
location New Zealand
age 45
visits member for 3 years, 4 months
seen 6 hours ago

7h
comment Estimate projected database growth
A few words of explanation (how this works etc.) would probably be helpful.
1d
comment SQL Server - constraint to prevent overlapping dates
Your question seems to be asking how to prevent overlaps. The existing answer shows how to do this using DRI. It also links to an article that describes variations around allowing gaps or not. Seems the same to me, perhaps you need to clarify your question if indeed it is a different problem statement?
1d
comment What is the correct way to ensure unique entries in a temporal database design?
@AndriyM See the comments on Alex's article, re: using MERGE.
2d
comment Allow non-sys admin, non-owner of a job to execute it
+1 Excellent answer that will help future visitors to the site as well.
2d
comment Adding warning with sp_add_alert doesn't work with “Greater Than” and SQL Server 2014
Did you report the bug at connect.microsofft.com?
2d
comment Why are U locks required when using Read Committed Snapshot Isolation
@Clement We'd probably be better off discussing this further in chat.
2d
comment Why are U locks required when using Read Committed Snapshot Isolation
@Clement As the first definition says, that can't happen under any isolation in SQL Server, because 'dirty writes' are not allowed. The 'lost update' RCSI read-locking avoids is the second sense: an update based on an out-of-date value. People would not expect a single statement to be vulnerable to that, in the way a read-delay-then-write transaction obviously is.
Jul
20
comment Casting fails on subquery result
Why does the join predicate use LIKE?
Jul
20
comment Casting fails on subquery result
This assumes the WHERE clause is applied before the expression in the SELECT clause is evaluated, which is not guaranteed.
Jul
17
comment Why Does UNPIVOT Work on Compatibility Level 80 DB?
@Andrew Yes. It is the context database that is important.
Jul
4
comment Resolving deadlock from 2 tables only related through indexed view
@SeanGallardy The part of the query plan that maintains the indexed view runs internally at SERIALIZABLE (there's a bit more to it than that, but this is a comment not an answer :)
Jun
27
comment Why does an UPDATE against a table with an INSTEAD OF UPDATE trigger appear to do a clustered index insert, as well as a clustered index update?
@MaxVernon No, the rename occurs when the internal execution plan is translated to XML show plan. It's not user-visible, (except when using a debugger :).
Jun
20
comment Mongo DB Backup & restore
Cross-posted from Stack Overflow. Flag the existing question for migration rather than copy/pasting to the new site please.
Jun
17
comment Understanding execution plans using TVPs
+1 for the heroic SQLfiddle effort. FWIW the final sort that multi-pass spills seems the worst bit to me.
Jun
16
comment Rejoining range seek on nullable composite index?
@JonSeigel Equally, it may mean using those procedures directly in an ODBC/OLEDB application instead of using the provided native interfaces was never supported. BOL is written strangely in a number of places. As far as I recall, they have always been supported for use with T-SQL.
Jun
16
comment Rejoining range seek on nullable composite index?
@JonSeigel That may have been true a long time ago (e.g. pre-2000). Looks like just another example of BOL content that was never updated when things changed. There are any number of examples of official fixes etc in this area e.g. this one which includes a T-SQL usage example.
Jun
9
comment Search, filter and group across all columns in a tall and wide dataset quickly
@Mendhak Questions can easily be reopened - see comments and the close reason text. That said, it seems you have an answer to this question, and you now have a new question about GROUP BY performance. You should ask that question :)
Jun
8
comment exec sp_getapplock - Different behaviour using go or without go
You don't seem to be checking the return code from sp_getapplock. If this is < 0, the app lock was not granted.
Jun
6
comment How to select specific rows if a column exists or all rows if a column doesn't
Yuck! But +1 for creativity :)
Jun
6
comment Joining on same table without duplicating data in a field or using c#
@CarllDev Updated the answer.