Viewing 15 posts - 1,576 through 1,590 (of 1,825 total)
My point being , to the 'untrained' eye what is the worst performing of these two queries 😀
edit : Judging only by the output of 'set statistics io on'
Query 1...
August 26, 2009 at 7:47 am
It purges any in-memory pages SQLServer has , dont attempt to compare relative performance of queries with doing it.
August 26, 2009 at 7:36 am
Its all down to the query plans...
See this article on how to post them ,
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
August 26, 2009 at 7:31 am
Are you doing a fair test ?
Are you doing 'dbcc dropcleanbuffers' between your tests ?
August 26, 2009 at 7:26 am
You simply cant. Rollback will rollback all currently open transactions on that connection.
Data written to @ table do survive the rollback , so maybe you can use that ?
August 26, 2009 at 7:02 am
You can use multiple CTE's within the same statement, heres a simple example.
with cteObjects(Name)
as
(
select Name from sysobjects where name like 'a%'
),
cteWithRow(Name,OrderCol)
as
(
Select Name,...
August 26, 2009 at 2:49 am
AJ (8/26/2009)
Please tell me if anyone have any direct solution because I dont want to hit the performance, and dont want to use CTE too.
Why Dont you want to use...
August 26, 2009 at 2:12 am
Wrap it in Cte
with cteUsers(UserId,UserName)
as
(
select UserID,dbo.getUserName(UserID) as 'UserName'
from User
)
Select UserId,UserName
from cteUsers
order by
case when @sortorder = 1 then UserId end desc,
case when @sortorder = 2...
August 25, 2009 at 8:00 am
FYI , this is the best resource on dates in sqlserver
August 25, 2009 at 7:26 am
Hope there should of been a question mark after that Gail 🙂
Personally , I prefer security through security and use SQLServer's excellent inbuilt processes. 😉
August 25, 2009 at 5:49 am
Not challenging at all if you use a calendar table...
August 25, 2009 at 5:14 am
Looking forward to this explanation!
August 25, 2009 at 4:51 am
Viewing 15 posts - 1,576 through 1,590 (of 1,825 total)