Viewing 15 posts - 33,976 through 33,990 (of 59,099 total)
Vedran Kesegic (5/9/2011)
If explanation about very few loop iterations was not enough for you, here is a complete test case:
1 Row of test data simply doesn't constitute a "complete" test...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 10, 2011 at 8:51 am
Vedran Kesegic (5/10/2011)
You claim 700% faster yet I see no test data.
Jeff, did you run the script ?
Yep... 1 row does not constitute adequate test data. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
May 10, 2011 at 7:42 am
By a "cell", I mean an intersection of a row and a column. I should have just said "data element".
I forgot about the dash. It's used as a...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 9:46 pm
peterzeke (5/9/2011)
Jeff Moden (5/9/2011)
peterzeke (5/6/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 9:38 pm
Vedran Kesegic (5/9/2011)
Jeff Moden (5/9/2011)
Vedran Kesegic (5/9/2011)
I could easily write it in the form of the non-RBAR, but the performance would not be as fast.
You have test code that...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 9:34 pm
Try this out... and, no... there's no dynamic SQL in it. The bloody forum software just makes it look that way...
USE AdventureWorks;
WITH
cteDirectReports AS
(
SELECT EmployeeID, ManagerID,...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 7:49 pm
I believe you're trying to solve too many problems at the same time. "Divide'n'Conquer". Solve the hierarchy first then join the other tables to get the amplifying information.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 7:03 pm
jhorowitz10 (5/6/2011)
You might also want to check out this link:http://www.sqlservercentral.com/articles/T-SQL/63681/
How to easily Converting Rows to Columns using Crosstabs
With a first post like that, I've just gotta say, "Welcome Aboard!"...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 6:48 pm
terrykzncs (5/9/2011)
Have you had any luck tuning your query?
Like they said before, start with replacing the cursors with set statements. But then replace the temp tables with table variables.
How big...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 6:39 pm
I actually prefer that people in the office ask me if there's something they don't know. The internet has way too many bad answers to a lot of things...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 6:28 pm
SQLRNNR (5/7/2011)
GilaMonster (5/7/2011)
Jeff Moden (5/7/2011)
GilaMonster (5/6/2011)
Off to SQLSaturday, the first one in Africa
You can only say that once. I don't know if you had anything to do with it...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 6:04 pm
WayneS (5/9/2011)
Jeff Moden (5/9/2011)
I've got one still outstanding, myself.
Plus a rewrite an expansion of Tally OH! based on new findings, plus your book, plus the varchar(max) splitter, plus the Running...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 5:38 pm
peterzeke (5/6/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 5:30 pm
Vedran Kesegic (5/9/2011)
I could easily write it in the form of the non-RBAR, but the performance would not be as fast.
You have test code that proves that, right?
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 5:22 pm
Thanks for the feedback, Christian.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2011 at 5:17 pm
Viewing 15 posts - 33,976 through 33,990 (of 59,099 total)