|
|
-
|
|
Today, I will explain about internal execution details of recursive CTEs.
Recursive CTEs will give the solution to some old age problems, where we can express solutions by writing only recursive solutions. Before SQL 2005, cursors were used to express these types of problems. With the invention of ......
|
|
-
|
|
When I was looking the plan cache for the queries having “Table spool”, I came across this query.
INSERT INTO @Result (OID,Partkey)
SELECT OID, dbo.fgetPartKey(OID)
FROM fn_getSplit( @P_OIDS,',' )
WHERE OID > 0
</pre>
Query optimizer used the below plan to execute the above......
|
|
-
|
|
This question was asked by Erland sommarskog in SQL Server Quiz 2010, conducted by BeyondRelational.com.
Suppose, create a table like below,
CREATE TABLE quiz (
ident INT IDENTITY PRIMARY KEY,
colname1 VARCHAR(127) COLLATE Latin1_General_CI_AS NOT NULL,
colname2 VARCHAR(127) COLLATE SQL_La......
|
|
-
|
|
There are innumerable numbers of questions asked in different forums about datetime concepts. I found so many replies using the functions such as Cast, Convert, Month () and Year () in where clause. There is a disadvantage with these functions. If the datetime column has index, these functions wi......
|
|
-
|
|
This post is inspired by a discussion at MSDN forums, which is about the Performance effect of Cast,Convert and Year() functions on Datetime columns in where clause. In MSDN forums, recently saw a question, “how to retrieve the records from a table having the Year 2005?” and found the below reply......
|
|