Viewing 8 posts - 1 through 8 (of 8 total)
Rearranging the joins did it - it's now taking 1 second regardless of what is saved last.
Attaching execution plans would have been overcomplicated. My proc with the final statement...
June 5, 2008 at 7:27 am
I shifted the order of the joins and it's now taking 1 second regardless of which was saved last. Thanks for the advice.
June 5, 2008 at 7:06 am
Thanks for the reply...it just felt like a hack to convert to smallint, get max and convert back.
Here's what's odd about the derived table - and originally I did a...
June 5, 2008 at 6:43 am
Jack Corbett (6/4/2008)
June 4, 2008 at 3:05 pm
I only used a view this time because the values I needed are needed across 5 different stored procedures, and I'd rather guarantee the various procs are using the same...
June 4, 2008 at 3:01 pm
Thanks, I like that suggestion. It looks like I was overthinking myself on my B option.
July 16, 2007 at 6:12 pm
Is there an advantage to your suggestion over either of mine? You're taking 2 conditions and turning them into 2 sets of case statements, where each set contains the same...
July 16, 2007 at 11:15 am
I'm trying to do this without 2 queries, because that means 2 places to maintain return columns. While I don't want to ever assume exactly one will always be provided,...
July 16, 2007 at 10:28 am
Viewing 8 posts - 1 through 8 (of 8 total)