Viewing 12 posts - 1 through 12 (of 12 total)
Yes, I cut down the other table to -1 and 0. If there's anything else I could try, very happy to 🙂
I partitioned the rank function by a SeriesId as...
April 12, 2011 at 3:40 pm
Well, in my application it seems about the same as the Outer Apply method. I only need the previous (not the next) day's value, for 5000 series of about 1000...
April 12, 2011 at 3:28 pm
Hi Mohammad. I can run this on my data - right now it looks like it's picking out the current, previous and next 'date' or seq-nbr? What I'd need is...
April 12, 2011 at 12:20 pm
I'd probably only consider a .NET approach if I could get savings of 30% or so somehow. My while loop only has a few iterations so I'm wondering about this...
January 7, 2011 at 1:57 pm
Thanks - that's reassuring... so it's not worthwhile passing things out to some procedural language that's good at loops somehow?
January 7, 2011 at 1:02 pm
Thanks - I just gave that a try to see if the query plan was any different but it seems identical to what I'm doing. Running a longer test now...
January 7, 2011 at 12:45 pm
Just wanted to return to say I tried using Outer Apply as described and it was indeed faster for me too. Thanks all for your help.
January 3, 2011 at 1:51 pm
That's very interesting David - thank you for investigating. Now to try and understand... 🙂
November 18, 2010 at 6:27 am
Thanks - I read Paul's articles (skimmed the trickier bits) and it seems that the optimiser recognises a nested loop when it sees it... but I don't see that it...
November 12, 2010 at 9:38 am
Thanks - Mr Charlie says Outer Apply might allow more efficient index use:
charles.gildawie (8/20/2010)
November 12, 2010 at 6:04 am
OK, confession time. Reading Charles' Outer Apply suggestion I can't see why this isn't a RBAR solution. Doesn't the Outer Apply do exactly what a subquery of the type 'Top...
November 11, 2010 at 4:14 pm
I got this CTE approach working for a related case - my first not-entirely-trivial query! Thanks David and all who have contributed via these comments. Next stage is to try...
November 9, 2010 at 2:39 pm
Viewing 12 posts - 1 through 12 (of 12 total)