Display all Column information in single cell ? got result, but not able to understand concept

  • The niftiest trick is this:

    CREATE INDEX IXC_TestData_Cover1 ON dbo.TestData(SomeID,SomeCode)

    My timing is:

    ================================================================================

    "Ugly trick" code...

    SQL Server Execution Times:

    CPU time = 1125 ms, elapsed time = 1091 ms.

    ================================================================================

    XML code...

    SQL Server Execution Times:

    CPU time = 1375 ms, elapsed time = 1339 ms.

    ================================================================================

    Seems like with index like this it scans the index for all data and skips the table entirely. If I create the index without somecode field:

    CREATE INDEX IXC_TestData_Cover1 ON dbo.TestData(SomeID)

    both queries run about 4x slower and the difference between them is a lot smaller.

    😎

  • That would be exactly correct... that's why I said "Code is not the only thing to consider where performance is concerned." 😀

    By the way... if you're getting these times of just over 1 second, you must have a nasty fast machine compared to my poor ol' 1.8 Ghz 1GB P5, 6 year old desktop with standard IDE drives. Would you mind telling us what you have in your box, Robert?

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

  • Not that much. I bought it few months ago. Core2 duo 6600, 2gb ram, WD sata2 300gb. Fast disk (throughput 35mb/s write and 49 read), fast ram and a quality mob with P35 chipset. The only fastest disk so far was a samsung 80GB pata I have on my older comp - I discovered years later that it was the best disk around at the time.

    Oh, and an ati radeon x1950 so I can vent anger from work frustrations on some 3d games.

    Software cost (licences and time spent to install all tools, updates) is significant, so upgrade comp only if you absolutely have to.

  • Thats not even fair :crazy:

    No, I am really happy for you Robert :unsure:

  • Unfair?

    Matter of planning. Hardware is cheap. In US it's even cheaper than in Europe.

    Savings are significant: I can simultaneously debug a fat client, ISAPI dll, sql triggers and all interactions. I don't have to go to lunch while a C++ project builds, just go out for a minute to take a breath. Though I primarily work with Delphi which doesn't have such problems. When I don't need full power, it lowers frequency and some other things to save energy.

    So, with new hardware I save on work and energy efficiency, (statistically) lower downtimes because of more reliable and efficient hardware, so investment returns quickly.

  • That's a pretty awesome machine...

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

  • Unfair?

    Not really, I was horsing around. But mind you that not everyone gets to choose there PC, whether there is a benifit or not.

  • Jeff Moden (3/10/2008)


    That's a pretty awesome machine...

    It's amazing the amount of hardware you can get these days...I just got the AMD equivalent of that machine for $329. Double the RAM (60$) and wicked video card ($120), and poof - you can unhook the horses, ma, 'cause we're going turbo for less than $500....:)

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Not really, I was horsing around. But mind you that not everyone gets to choose there PC, whether there is a benifit or not.

    True for work computer in some companies. But for home PC I guess you have a full freedom. Hardware is cheap, though for Matt's PC I'd pay here over 500 eur. Even worse is for other hardware - camcorder prices are double compared to US.

Viewing 9 posts - 16 through 23 (of 23 total)

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