FizzBuzz

  • Yes Mister Magoo, I can certainly echo that sentiment.

    It's been an interesting experience!:ermm:

  • The thing is - generating the rows is lightning fast, but generating the fizz/buzz/fizzbuzz/varchar(number) values is dead slow - that is the new challenge....make that more efficient, but stick to smaller sets like a billion maybe.

    MM



    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

  • Yeh, whose idea was it to scale this to a trillion anyway?:unsure:

  • THE QUINTILLION?

    MM



    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

  • Heck why not?

    And miss out the QUADRILLION altogether!:-)

  • So, when is the award for the Fizzbuzz challenge on AskSSC going to be awarded?

  • Lynn Pettis (4/6/2010)


    So, when is the award for the Fizzbuzz challenge on AskSSC going to be awarded?

    It was awarded at the end of last night tomorrow.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • But to get it I need you use the new version of DBCC TimeWarp that will be released the day after yesterday?

  • Lynn Pettis (4/6/2010)


    But to get it I need you use the new version of DBCC TimeWarp that will be released the day after yesterday?

    Precisely.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Sorry, my fault. I'll go review the entries this week and award something soon. Likely by Monday

  • Steve Jones - Editor (4/6/2010)


    Sorry, my fault. I'll go review the entries this week and award something soon. Likely by Monday

    Heh... hey Lynn! Good suggestion on using the DBCC TIMEWARP command... it worked like a charm. If you used the hampster poo enhancment, then it will actually occur on Monday or it will have occurred two days ago and you've missed it.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (4/6/2010)


    Steve Jones - Editor (4/6/2010)


    Sorry, my fault. I'll go review the entries this week and award something soon. Likely by Monday

    Heh... hey Lynn! Good suggestion on using the DBCC TIMEWARP command... it worked like a charm. If you used the hampster poo enhancment, then it will actually occur on Monday or it will have occurred two days ago and you've missed it.

    LOL

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Unless someone has a great argument, I am going to choose Gianluca's entry here: http://ask.sqlservercentral.com/questions/4241/whats-the-best-way-to-solve-the-fizzbuzz-question/4631#4631

    It seemed to perform the fastest on my machine.

  • Steve Jones - Editor (4/6/2010)


    Unless someone has a great argument, I am going to choose Gianluca's entry here: http://ask.sqlservercentral.com/questions/4241/whats-the-best-way-to-solve-the-fizzbuzz-question/4631#4631

    It seemed to perform the fastest on my machine.

    No argument. I think it was a mix mash of who's performed faster depending on the day. I frequently saw the faster query change between his, Lynn's and mine.

    I also like the view version - but am not certain it was entered into the contest. I am pretty certain it is in this thread though.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Steve Jones - Editor (4/6/2010)


    Unless someone has a great argument, I am going to choose Gianluca's entry here: http://ask.sqlservercentral.com/questions/4241/whats-the-best-way-to-solve-the-fizzbuzz-question/4631#4631

    It seemed to perform the fastest on my machine.

    I agree... in fact, after I got done testing his UNPIVOT method, I changed my table-less cteTally generators to use it that day.

    Well done, Gianluca!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Viewing 15 posts - 286 through 300 (of 363 total)

    You must be logged in to reply to this topic. Login to reply