Viewing 15 posts - 3,841 through 3,855 (of 7,636 total)
It's weird actually. There's no obvious reason why RANK() and ROW_NUMBER() should be faster than MIN(), but they clearly are when you look at the differences in the execution...
January 16, 2009 at 6:39 am
Heh. Fair enough, I never have to do it so I forget the exact language names sometimes.
January 16, 2009 at 6:37 am
Agreed Jeff. Sergiy's example succinctly proves my point.
Thanks, Sergiy!
January 16, 2009 at 6:32 am
Can you show us the execution plan.
January 15, 2009 at 10:45 pm
Duplicate post. Please reply here http://www.sqlservercentral.com/Forums/Topic637721-147-1.aspx
January 15, 2009 at 8:13 pm
A "query" probably has to be a single statement.
January 15, 2009 at 4:40 pm
You cannot do expressions in the EXECUTE command. You need to do them in a preceding SET or SELECT.
January 15, 2009 at 4:30 pm
RBarryYoung (1/15/2009)
January 15, 2009 at 3:32 pm
ScottPletcher (1/15/2009)
select isdate(col1), *
from #t
where isdate(col1) = 0
or datepart(year, col1) = 2001 --sql treats yr "1" as "2001"
SQL will definitely short circuit when it knows...
January 15, 2009 at 3:28 pm
ScottPletcher (1/15/2009)
As I said, it was my understanding that the SQL optimizer did not do that for simple (non-query) expressions connected by boolean operators, that it evaluated left-to-right.
You may be...
January 15, 2009 at 3:17 pm
Erp! Sorry, I missed that this was SQL Server 2000...
January 15, 2009 at 3:13 pm
ScottPletcher (1/15/2009)
Forgetting that the order that AND clauses are evaluated in at run-time has nothing to do with the order that they are written.
I thought SQL Server did...
January 15, 2009 at 1:20 pm
Viewing 15 posts - 3,841 through 3,855 (of 7,636 total)