Reputation
31,538
Next tag badge:
486/400 score
71/80 answers
Badges
8 79 132
Newest
 Enlightened
Impact
~931k people reached

Apr
16
comment How can I replace the following query with ISNULL function in SQL?
Regarding the " performance optimization reasons" - except if there is a sub query involved any difference isn't worth worrying about
Apr
14
comment SQL Server - Changing a column from NOT NULL to NULL - What's going on under the hood?
@AaronBertrand - Thanks didn't spot that!
Apr
13
comment SQL Server - Changing a column from NOT NULL to NULL - What's going on under the hood?
RandyMinder - This is new syntax for 2014. Search for WITH ( ONLINE = ON | OFF) <as applies to altering a column> in the link from @ypercube.
Apr
13
comment SQL Server - Changing a column from NOT NULL to NULL - What's going on under the hood?
After testing with referencing the column in an NCI which consisted of 1731 leaf pages, 7 2nd level pages and a root page and altering to NULL caused 1731 logged entries for LOP_FORMAT_PAGE,LCX_INDEX_LEAF and 7 for LOP_FORMAT_PAGE, LCX_INDEX_INTERIOR so does look to be not metadata only after all. Maybe for the reasons @souplex suggests.
Apr
13
comment SQL Server - Changing a column from NOT NULL to NULL - What's going on under the hood?
Probably blocked waiting on a SCH-M lock. Unlike the opposite case pretty sure this is metadata only. You can check sys.dm_os_waiting_tasks whilst it is blocked.
Apr
9
comment UPDATE() Function (Insert and Update Triggers)
I don't think this is relevant? Pretty sure they are asking about this msdn.microsoft.com/en-us/library/ms187326.aspx
Apr
7
comment Can statistics affect the query logic instead of performance?
Yes this is entirely possible as discussed in this Connect Item connect.microsoft.com/SQLServer/feedback/details/537419/…
Apr
7
comment Unexpected Implicit conversion in a procedure
@Stackoverflowuser - No need to hurry.
Apr
6
comment Estimated versus actual query plan with function calls
@usr - This one here? 3 months? That must be a record turn around for a new feature request!
Apr
6
comment Shorthand for on primary key?
No, there is no such syntax.
Apr
6
comment SQL queries failing, Memory not releasing
"queries begin to fail" in what way?
Apr
6
comment Estimated versus actual query plan with function calls
@usr - Maybe because the actual cached plan that is selected can vary dependant on the actual number of rows as described here? technet.microsoft.com/en-us/library/…
Apr
6
comment SQL Server index causing incorrect behavior on cursors
@max you're responsible for avoiding the issue yourself with dynamic cursors. See this section by Ken Henderson books.google.co.uk/…
Apr
5
comment Inner Join and Right Join same query
This returns 1 and 2 SQL Fiddle
Apr
5
comment SQL Server : Index Seek with very high Scan Count
Please show the exact query, the table definitions, number of rows in both tables and the execution plan.
Apr
5
comment SQL Server : Index Seek with very high Scan Count
stackoverflow.com/a/21778788/73226
Apr
3
comment Guid vs INT - Which is better as a primary key?
Makes sense!...
Apr
3
comment Guid vs INT - Which is better as a primary key?
What value does the GUID give if the id already is sufficient for humans to identify a row?
Apr
3
comment SQL server deadlock graph explained
Is there a foreign key between text and page_item? Presumably currently these statements are all running in a transaction. Can you remove that so they run in separate transactions?
Apr
1
comment How to re-declare T-SQL variables if it already exist?
GO is understood by the client tools (that parse and split into batches) not SQL Server itself.