@SteveWithAQ @BrentO Prefix on stored proc name is not unnecessary. All schema-based objects should always be schema-qualified, for both security and performance. No schema-qualifier forces SQL Server to search "dbo" schema and user's default schema, causing extra locking and unlocking.
@BrentO 1) Missing "SET NOCOUNT ON;". 2) Commas at beginning of line instead of the end. 3) PK column uses generic "Id" instead of TableName+Id (e.g. "PostsId" or even "PostId"). 4) Might could benefit from an "ORDER BY". 5) "OwnerUserId" in SELECT unnecessary as value is passed in.
I should have posted this earlier, BUT in 45 minutes I will be hosting a live Q&A session for my Module Signing presentation at this year's PASS Data Community
SUMMIT https://t.co/8mNIKqHhE3
@TheToddmonster Hi there. Sorry, I didn't get the notification for this and just saw it. Are you still in need of help? If so, it would be more reliable to contact me via my blog: https://t.co/kBDX46cHw3
Fixed both lists of "Supported .NET Framework Libraries" via PR 4638 ( https://t.co/tvtAmLBSlV ) in the #SQLServer#Documentation. @SQLDocs#SQLCLR@SQLsharp https://t.co/Sop6SrpguS and https://t.co/TjNa1YBGjk
@sqlstudent144 Although, even in those 2 cases, the non-PK index wouldn't really need to be declared as UNIQUE since that was already being enforced via the PK. But, it would allow for referencing the non-PK index via an FK on another table, which would be quite unnecessarily messy.
@sqlstudent144 Is one ASC and the other DESC? Or, is one partitioned and the other not partitioned? In either of those scenarios there would be a difference in performance. If they are the same ordering and partitioning, perhaps you are simply being tested ;-)
@martinsmith_ Martin (and @AaronBertrand): In the case I was looking into it was querying via .NET SqlClient which is likely just as sensitive to minor errors as `TRY...CATCH` in T-SQL. I also reproduced your test result with `XACT_ABORT ON` using SSMS 18.4, so not specific to SSMS < 17.0
Another #SQLServer#Collation#MysterySolved (true, it's mostly obsolete as it only affects SQL Server 2012, but still, one less mystery hanging out there) https://t.co/ubWj350lIJ https://t.co/PsK97jaFux