Forum Replies Created

Viewing 15 posts - 16 through 30 (of 30 total)

  • RE: The T-SQL Quiz

    I done this comparisson (see my posts before) . The result is practically the same. Again, there is no magic  Internally set based solution...

  • RE: The T-SQL Quiz

    Just for fun:

    WHILE LOOP TEST...

    100000000 The final count (just to show work was done)

    111480 Duration in milliseconds

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

    SET BASED TEST...

    100000000 The final count (just to show work was done)

    15296 Duration...

  • RE: The T-SQL Quiz

    First time

     

    WHILE LOOP TEST...

    1000000 The final count (just to show work was done)

    1073 Duration in milliseconds

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

    SET BASED TEST...

    1000000 The final count (just to show work was done)

    263 Duration in milliseconds

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

    Next...

  • RE: The T-SQL Quiz

    Jeff, I have 2.18 Ghz Intel Duo, 4GB RAM, single HD , 2005 Developer Edition SP2, laptop.

    I believe, for this example any solution should work practically the same, loop or...

  • RE: Portability

    I have been three times in position of database architect responsible for design, implementation and support of multiple databases simultaneously.

    The database independent approach never worked, because:

    ·         Some...

  • RE: The T-SQL Quiz

    BTW, Jeff, your solution first time - 32 sec, then in average 13 sec

  • RE: The T-SQL Quiz

    BIZZ

    BUZZ

    Elapsed Time: 19393 ms

    I just ran it

    2 times less efficient that optimizied loop approach that use CASE

    Still good enough

  • RE: The T-SQL Quiz

    You are right

    a) I got under impression that you meant that it is a bug in SQL Server

    b) by "scalability" I meant that your code is not scalable for...

  • RE: The T-SQL Quiz

    2.b "I see your point now. It is a bug, not a scalability issue. Your example with the scientific notation made it more clear."

    It's not a bug. The problem is...

  • RE: The T-SQL Quiz

    Hi webrunner,

    2.b Even in your example you should be surprized, why charindex returns 2, and not

    select CHARINDEX('.',1300001.0

  • RE: The T-SQL Quiz

    Sergiy, Single HDD but 7200 rpm. And I've used INTO #tempTable for set-based solution. Sure, I didn't. But, anyway, the point is that for some hardware configuration in-memory loop-based solution...

  • RE: The T-SQL Quiz

    It runs 9 sec on mine. I have Intel Dual Core 2.16 Ghz but 4GB of RAM. Interesting enough, the fastest set based solution runs 15 sec.

  • RE: The T-SQL Quiz

    1. "I did it without % because I couldn't find the mod function by name in Books Online"  - because % is an operator, not a function

    2. "IF (CHARINDEX('.',@DivResultBy3) =...

  • RE: The T-SQL Quiz

    Let's assume that we have the numbers populated in some table #numbers (the same solution will work with CTE)

    As far as I tested, the following solution about 2 times faster...

  • RE: My Projects Have Never Failed

    It's funny

    One day our department received a piece of paper from the vice president who said these were the specifications for a new...

Viewing 15 posts - 16 through 30 (of 30 total)