259 reputation
112
bio website
location
age
visits member for 2 years, 1 month
seen Dec 17 at 9:35

Dec
12
comment Forcing an index spool
Tried the 1st method, and it works. Thanks. But I get a row count spool after the index spool which you do not get in the plan you have shown. Any idea why?
Dec
11
comment Why are there execution plan differences between OFFSET … FETCH and the old-style ROW_NUMBER scheme?
Not very sure, so putting it as comment, but I guess its because you have the same order by condition for the row numbering and the final result set. Since in the 2nd condition, the optimizer knows this, it does not need to sort the results again. In the first case however, it need to make sure the results from the outer select are sorted as well as the row numbering in the inner result. Creating a proper index on #objects should solve the issue
Dec
11
asked Forcing an index spool
Dec
3
accepted Does the Query cost in Sql Server account for buffering?
Nov
29
accepted DBCC TRACEON (652) does not disable read ahead reads
Nov
29
comment DBCC TRACEON (652) does not disable read ahead reads
Wow, found out 2 awesome things in a single answer, though wondering, how did you find out that there is an exceptional case with the Batch Hash table build? Did you read about that somewhere, or was it just from trial and error?
Nov
28
awarded  Citizen Patrol
Nov
28
comment Will using bigint vs mediumint have a performance impact?
Kind of OT, but you mention Why does the user know the value of the ID column? . Isnt this acceptable behaviour in some cases? Example: students in a school will know their roll numbers, and that will probably be the only value uniquely identifying them. The same can be said for a bank account number as well.
Nov
27
comment DBCC TRACEON (652) does not disable read ahead reads
@MartinSmith No, I do have Hash Match (Inner Join) and parallelism though. Have uploaded the XML execution plan, though I have no clue how to read it
Nov
27
revised DBCC TRACEON (652) does not disable read ahead reads
added 19842 characters in body
Nov
27
asked DBCC TRACEON (652) does not disable read ahead reads
Nov
26
comment Bitwise operations in TSQL
True, but like in C I can say 0x00000010 to represent 16 in hexadecimal, or 0b00000010 to represent 2 in binary, is there a similar set of notations for TSQL?
Nov
26
comment Bitwise operations in TSQL
Ohk.. I'm actually moving to a SQL role from a C background, and atleast there, bitwise operators are usually noticeably faster than integer operators. I thought it would translate here as well
Nov
26
accepted Bitwise operations in TSQL
Nov
26
awarded  Editor
Nov
26
comment Bitwise operations in TSQL
oh.. Got it. Is there a way to specify binary numbers in T-SQL?
Nov
26
revised Bitwise operations in TSQL
added 302 characters in body
Nov
26
comment Bitwise operations in TSQL
But I explicitly casted 100 to binary
Nov
26
asked Bitwise operations in TSQL
Nov
26
suggested rejected edit on I have to update all the rows of a Column in a table. Here is my query