Tony Davis

Simple-Talk Editor
News, views and good brews

SQL Server Myths

Published Wednesday, June 27, 2007 4:24 PM

The whole area of "SQL Server myths" is an interesting one. One of the fascinations of working with SQL Server is that, the more you learn, the more you realize you don't know. To the beginner SQL Server is presented as a series of black-and-white facts and rules designed to make learning easier. It is a necessary dogma. However, the more one discovers, the more one is obliged to admit that there are shades of grey. There are very few technical answers to which you couldn't add the qualifying clause 'But, on the other hand...'.

 

There have been some very interesting blog entries that set out to be Myth Busters, but are really pointing out that it isn't wise to cling to hard-and-fast rules any longer than you have to. A recent one caught our eye, taking a new look at the adage that the use of foreign key constraints slowed performance. I suppose that the answer is 'Yeeesss, but, on the other hand...' (Selects can be faster sometimes, evidently).

 

Denis Gobo's blog entry, SQL Myth: Truncate Cannot Be Rolled Back Because It Is Not Logged was a useful reminder of the need to test anything you're told about SQL Server. Also, it reminded me of the debate about using table variables, which was triggered off by a tip last year on SQLServerCentral. The tip contained this advice:

 

Table variables are created and manipulated in memory instead of the tempdb database'

 

This ended in a fascinating post by Darren Gosbell, with a comment by Greg Linwood.

 

Greg Linwood's series on clustered indexes has been fascinating reading, and the dogma about every table requiring a clustered index received a mauling in his blog entry Debunking myths about clustered indexes - part 1 (CIXs worsen bookmark lookups)

 

On a broader subject, Euan Garden's blog is always interesting and his posting on SQL MythBusters – SQL Server is really a Sybase product not a Microsoft one was refreshing and timely. More of these legends are mentioned in the amusing articles The myths and legends of the holy land of the database, by Mark Whitehorn, which contain the excruciating 'So, happily, Larry Ellison doesn't have to say to his marketing people, "That's another fine myth you've gotten me into".'

 

One of the most irritating myths for the relational database developer is the myth of the superiority of the object-oriented approach and OODBMSs. Here is a typical contribution to the debate from Dare Obasanjo, Why Aren't You Using An OODMS?

 

It is therefore refreshing to read Object Oriented Programming Oversold!, by Mr. B. Jacobs 

 

These just happen to have been the contributions that have stimulated us to argue and try things out, but we'd love to hear from anyone else who has seen some iconoclastic work on SQL Server. Simple-Talk gift bags to the three best contributions.

 

Cheers,

 

Tony.

Comments

 

drsql said:

>>useful reminder of the need to test anything you're told about SQL Server<<

It should also hopefully serve as a reminder to all of the people who tell people stuff that they haven't actually tested :)  

I have been using SQL Server, well, like forever, and one thing I never do anymore is take for granted that I know something until I have tested it, usually in a test script that I include with most any advice I dole.
July 24, 2007 11:39 PM
You need to sign in to comment on this blog

















<June 2007>
SuMoTuWeThFrSa
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567
Verity Stob: Geek of the Week
 Real geeks read Verity Stob. Verity writes her painfully funny invective from a powerful advantage, she... Read more...

SQL Server Index Basics
 Given the fundamental importance of indexes in databases, it always comes as a surprise how often the... Read more...

Managing Exchange 2007 Mailbox Quotas with Windows PowerShell
 The use of PowerShell with Exchange Server 2007 can do a great deal to ease the task of managing... Read more...

Optimizing Exchange Server 2007
 Brien Posey ponders an 'off the cuff' remark that Exchange 2007 runs so well with a default... Read more...

Virtual Exchange Servers
 Microsoft now supports running Exchange Server 2007 in server virtualization environments, not just on... Read more...