Viewing 15 posts - 11,041 through 11,055 (of 22,214 total)
jcrawf02 (4/23/2012)
Brandie Tarvin (4/20/2012)
Grant Fritchey (4/20/2012)
April 23, 2012 at 9:05 am
It's parameter sniffing at work. When you use local variables, you get a scan of the statistics (unless a recompile is involved). When you use parameters, you get a search...
April 22, 2012 at 4:31 am
Based on that, you also could just be looking at contention on the second server. However, from what you said, you saw two different execution plans. Two plans are caused...
April 20, 2012 at 9:30 am
If by script you mean you didn't run a stored procedure? It might mean that you're seeing bad parameter sniffing. Which, again, could be caused by differences in statistics.
Remember, I'm...
April 20, 2012 at 8:57 am
Tried one more. It won't be right either, but an effort was made.
April 20, 2012 at 8:53 am
riya_dave (4/20/2012)
and this udf returns table,not scalar
Not defined in the original sets of posts. See why so many people are having trouble understanding what's going on?
How about something like this:
JoinedTable.account,
COALESCE(JoinedTable.mtd1,(JoinedTable.mtd2+i1.VALUE)
(SELECT...
April 20, 2012 at 8:52 am
Lynn Pettis (4/20/2012)
I wanted to say...
April 20, 2012 at 7:49 am
David Burrows (4/20/2012)
INSERT #temp3 (account,MTD,ytd)
SELECT t1.account,
COALESCE(t1.MTD,t1.m1 + account(@p1)),
COALESCE(t1.ytd,t1.y1 + account(@p1))
FROM #temp1 t1
LEFT JOIN #temp2 t2 ON t2.account = t1.account...
April 20, 2012 at 7:45 am
I am making an honest attempt to help out here.
First, I had to change your code because it won't run. Here are the updates:
CREATE TABLE #temp1 (
account INT,
...
April 20, 2012 at 7:44 am
I'm trying to understand, but I just don't get what you're doing. I'm sorry.
How do you get from this result set:
1001 23.45 34.32
1003 34.56 43.21
1003 null null.
To this result set:
1003...
April 20, 2012 at 4:13 am
The Dixie Flatline (4/19/2012)
Yes, Gail, I was at the last Summit...
April 20, 2012 at 4:05 am
Brandie Tarvin (4/19/2012)
April 20, 2012 at 4:00 am
Not knowing the internals of the multi-statement UDF, it's hard to know what to do about it, but those things are notorious performance pigs if you're dealing with more than...
April 20, 2012 at 3:58 am
Not seeing all the code & structures involved... not sure. Just guesses. Maybe moving to a tempdb creates a more up to date set of stats. Maybe moving to tempdb...
April 20, 2012 at 3:53 am
Viewing 15 posts - 11,041 through 11,055 (of 22,214 total)