Forum Replies Created

Viewing 15 posts - 1,396 through 1,410 (of 2,038 total)

  • RE: trying to figure out an update

    Bruce W Cassidy (4/13/2009)


    Florian Reischl (4/13/2009)


    I thought about the CTE while typing the sub-query. I just determined that, in this case, the sub-query is simple enough that it stays readable.

    Greets

    Flo

    [font="Verdana"]Agreed...

  • RE: Performance issue with tally solution

    RBarryYoung (4/13/2009)


    Paul White (4/13/2009)


    RBarryYoung (4/13/2009)


    1) For splitting the lines in stored procedure definitions, there is a subtle bug that exists in almost every line-splitting routine, including the ones so far...

  • RE: Performance issue with tally solution

    Lynn Pettis (4/13/2009)


    Flo,

    I understand needing to work with NVARCHAR(MAX). I was trying to find out why the Tally solution may have been slower, and I think the reason is...

  • RE: Performance issue with tally solution

    Lynn Pettis (4/13/2009)


    I think the reason the Tally version is slower has to do with the blob data type, nvarchar(max).

    I posted some information in The Thread.

    Hi again

    I just tested with...

  • RE: Performance issue with tally solution

    Lynn Pettis (4/13/2009)


    I think the reason the Tally version is slower has to do with the blob data type, nvarchar(max).

    I posted some information in The Thread.

    Hi Lynn

    Thanks for your feedback!...

  • RE: columns order based upon their total

    Hi

    I'm not sure if i got you. This?:

    ORDER BY sort, Central, Northeast, Middlewest, Northwest, Southeast, Southwest

    Greets

    Flo

  • RE: trying to figure out an update

    I thought about the CTE while typing the sub-query. I just determined that, in this case, the sub-query is simple enough that it stays readable.

    Greets

    Flo

  • RE: Performance issue with tally solution

    RBarryYoung (4/13/2009)


    And finally, here is the inclusion code to inlcude it with the other tests:

    --- ==========================================================

    --- -> Tally/fUNCTION solution

    PRINT 'Start Tally-function 3 solution (correct line-splitting)'

    SELECT @now = GETDATE()

    --- Split...

  • RE: Performance issue with tally solution

    Good morning Paul! (every time I see your first posts I know it's time for bed 🙂 )

    Paul White (4/13/2009)


    I'm still wondering why the CLR TVF is so much slower...

  • RE: Database design and FK relationships

    Hi John

    John Deupree (4/13/2009)


    1. Would you consider this DB to be a relational DB, albeit poorly designed?

    The database is relational but not of integrity 😉

    2. Is there any performance gain...

  • RE: trying to figure out an update

    Hi foxjazz

    A temp table is a valid solution. You can also use a sub-select to avoid the overhead with the temp table.

    Try this sample:

    DECLARE @t TABLE

    (

    ProductId INT,

    ...

  • RE: Help me - Count function

    sreddy (4/13/2009)


    sreddy (4/13/2009)

    --------------------------------------------------------------------------------

    select

    user.userid,

    user.name,

    count(news.userid)

    from user

    inner join news on user.userid = news.userid

    group by user.userid,

    user.name

    Why count(userid)?

    j1a4l0: What do you want returned for a user that has no news items?

    --------------------------------------------------------------------------------

    Gail Shaw

    thats...

  • RE: columns order based upon their total

    Hi

    You can use a CTE. Include a UNION ALL for your data and their SUM values. In addition add a sort column to ensure that the Totals are always on...

  • RE: Performance issue with tally solution

    Hi Bruce

    Bruce W Cassidy (4/13/2009)


    [font="Verdana"]Flo, I'll add my kudos as well: it's good to see some numbers showing how CLR rates in comparison with T-SQL. And I'll look forward...

  • RE: Performance issue with tally solution

    Jeff Moden (4/13/2009)


    Florian Reischl (4/13/2009)


    Jeff Moden (4/13/2009)


    I'm thinking that the hey-day of the Tally table have finally been replaced by faster methods.

    Don't say that. There might be actually two business...

Viewing 15 posts - 1,396 through 1,410 (of 2,038 total)