Home Forums Programming General Question regarding the difference between two different ways to populate a new table in TSQL RE: Question regarding the difference between two different ways to populate a new table in TSQL

  • TomThomson (8/24/2014)


    Jeff Moden (8/23/2014)


    There's nothing wrong with challenging a DA when it comes to performance

    up to there I agree with you 100%

    because, and with absolutely no malice in my heart, DAs don't actually need to know how to write a lick of code, never mind high performance code, to do their jobs correctly.

    And I don't agree with that at all; a DA had better be able to produce a schema design which enables high-performance code to be written, and if the DA knows nothing about code and in particular nothing about high performance code that DA is not going to be able to do that.

    I absolutely agree that they'd better be able to pull the proverbial rabbit out of the hat on schema design to enable high performance code to be written but, with the tools they use to do such a thing and the design patterns they follow, they don't actually need to know a thing about how to write the code.

    I went through that about a year ago. A company wanted me to come in to help them write some code. They introduced me to the DA and he spent about an hour going over the schema, the table keys, and the relationships for a huge database. It was a work of art bordering on genius. I asked him why with such a great design that they needed me to write code. His answer was (and I literally nearly fell backwards in my chair) "I only know how to design the databases... I don't actually know how to write code".

    As another example, I went through that at a previous company that I worked for. They built a whole new OSS in Oracle. Again, the design of the database was outstanding in every way I could think of. I'd been assigned a task that I was having problems writing code for (it was early in my experience with Oracle) so I went to the DA that designed it and starting drawing code on his white-board. He asked me to stop because he couldn't help. When I asked "Why not?", his comment was "This is a gibberish to me... I don't know how to do a 3 table join never mind what you've written so far". When I asked him how he designed the database, his reply was "The tools make it easy. I just need to fill in the right blanks and draw the right lines. It even builds the correct indexes for me".

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