Forum Replies Created

Viewing 15 posts - 11,041 through 11,055 (of 22,214 total)

  • RE: Are the posted questions getting worse?

    jcrawf02 (4/23/2012)


    Brandie Tarvin (4/20/2012)


    Grant Fritchey (4/20/2012)


    New rule, Threadizens, if you go down at a conference, you have to get word back to another Threadizen. Some of us actually do care...

  • RE: Stored Procedure is running very slow

    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...

  • RE: how to join 2 temp table into 1

    Wait, what was the solution?

  • RE: Stored Procedure is running very slow

    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...

  • RE: Stored Procedure is running very slow

    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...

  • RE: Are the posted questions getting worse?

    Tried one more. It won't be right either, but an effort was made.

  • RE: how to join 2 temp table into 1

    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...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (4/20/2012)


    Just read Riya_Dave's latest post, just more of the same "I'll repost what I have already posted, maybe with a few minor but incomrehensible changes."

    I wanted to say...

  • RE: how to join 2 temp table into 1

    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...

  • RE: how to join 2 temp table into 1

    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,

    ...

  • RE: how to join 2 temp table into 1

    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...

  • RE: Are the posted questions getting worse?

    The Dixie Flatline (4/19/2012)


    Okay, I will apologize for bringing this up in the Thread. But I'm getting tired of writing private messages.

    Yes, Gail, I was at the last Summit...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (4/19/2012)


    I am starting to do guest posts on my writing blog and I'm wondering if any of you Threadzian authors (who have done editing or writing on SQL...

  • RE: query needs optimizinG

    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...

  • RE: tempdb - unable to allocate page

    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...

Viewing 15 posts - 11,041 through 11,055 (of 22,214 total)