• SQL_ME_RICH (7/30/2012)


    Some of you may have heard of my latest tales of woe, in that I am in an environment that has Grails on the front end, along with MongoDB, MySQL, Redis, and Red Hat, and all of this is going in favor of Microsoft SQL Server. Assuming the obvious reasons are not the motivator (i.e. SQL licensing costs) I was dumbfounded to learn that premature optimization rules an iron fist in their ecommerce scheme. Where Foreign Keys are so greatly disliked for the sake of speed, that a 91 table database might have about 15 tables interconnected - and that is it. Now - that might be all that is needed, but when you factor in that any OLE DB / ODBC / JDBC device can now connect to this database - you have data integrity issues galore.

    I thought perhaps I was in an isolated nuthouse, but a recent conversation that I had with a fairly well respected DBA out here on the West Coast has proven that this is becoming a more common practice in e-Commerce scenarios (where speed is the key de jour, and data integrity? Who needs to worry about that...).

    Are we missing something here in the Microsoft SQL Server Community that is becoming a new way of doing business, or are people in the Western US who are using SQL Server for e-Commerce just nuts (where first to market on the latest e-Commerce idea means more to them than the security of the data they display).

    I would love for all of us to sound off on this one...

    The insanity isn't relegated to just the West coast. It's here in the Mid-West, as well. I worked with a supposed "master" developer who knew all of the tools. He used those tools to design a couple of tables. All of the INT columns were BIGINT and all of the character based columns, even if meant to hold only 1 character, where all NVARCHAR(4000). When I asked him why, his answer was "Premature Optimization is the Root of all Evil."

    The statement "Premature Optimization is the Root of all Evil" was never meant to justify such a garbage design. Gail Shaw teaches the subject and I hope she shows up on this thread because she does a much better job than I at explaining what it really means.

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