An Example of Test-Driven Development, Part 2

  • Thanks Andy for an interesting article, like some of the others I'm not sure I can see myself going down the test-driven route in the same way, but it's good to see how it's done.

    Interesting discussion about Alter vs Drop/Create. Here we Alter on the dev db, but deploy with drop/create (with an appropriate permissions script at the end). Only in extremis do we resort to backup/restore or shipping mdfs; apart from being poor practice in that it can mask broken code, there's generally too much hassle with realigning the permissions & getting round collation issues.

    I know this is taking the discussion off-topic but I think there could be some mileage in a SQL Server Mythbusting article to debunk those things everybody 'knows' about SQL Server. Obviously the Exists thing is a prime candidate. Other ones that come to mind are 'Table Variables are always held in memory/Temp tables are always written to disk', 'Subqueries perform worse than joins', 'Cross Joins are always bad' and 'Cursors are always bad' (note the 'always' - I'm not disputing that they're abused an awful lot of the time 🙂 )

    Cheers,

    Ian

  • Hi Ian,

    That's a good candidate for a Steve Jones Friday poll: What SQL Server myths did you once believe?

    :{> Andy

    Andy Leonard, Chief Data Engineer, Enterprise Data & Analytics

  • I know this is taking the discussion off-topic but I think there could be some mileage in a SQL Server Mythbusting article to debunk those things everybody 'knows' about SQL Server. Obviously the Exists thing is a prime candidate. Other ones that come to mind are 'Table Variables are always held in memory/Temp tables are always written to disk', 'Subqueries perform worse than joins', 'Cross Joins are always bad' and 'Cursors are always bad' (note the 'always' - I'm not disputing that they're abused an awful lot of the time 🙂 )

    I would really like to see such a mythbusting article along with examples that disprove them. I know I have been guilty of believing some of them at one time or another before actually investigating them for myself.

  • nice

  • Adam Gojdas (7/13/2009)


    I would really like to see such a mythbusting article along with examples that disprove them. I know I have been guilty of believing some of them at one time or another before actually investigating them for myself.

    If you're not already reading Paul Randal's blog, this is a good reason to start. Paul Randal is the best myth buster out there, in my opinion, and has done a lot of posts on it. In fact, he did a full month of daily posts busting myths last year.

    His blog: http://www.sqlskills.com/blogs/paul/

    Myth busting category: http://www.sqlskills.com/BLOGS/PAUL/category/Misconceptions.aspx


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

Viewing 5 posts - 16 through 19 (of 19 total)

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