Re: SQL Humor

From: Stu <stuart.ainsworth_at_gmail.com>
Date: 18 Aug 2005 11:55:55 -0700
Message-ID: <1124391355.281387.67280_at_g44g2000cwa.googlegroups.com>


Not that I totally disagree with the concept of deprecating char vs varchar, but I see this argument used a lot, and there's two flaws with it.

  1. Storage size may be cheap and plentiful, but performance should always be foremost in the DBA mind. 2 bytes in a single column pf storage may not be much, but you also need to write queries that retrieve that extra 2 bytes. It's not just disk space; it's also memory and CPU.
  2. Failing to appreciate the differences between varchar and char sets us on a path of lazy design. If it doesn't matter if I use char(10) vs varchar(10), then what's the matter with varchar(50)? How about varchar(51) etc? Eventually we could get away with "oh screw it; disks are cheap, memory is cheap, CPU's are powerful, let's just put everything in an text column and parse it on the fly".

I realize that what you are saying is a long way from suggesting that we just throw away relational design altogether, but it's the small steps that lead to the bigger leaps that lead to the cliffs.

Just my .02
Stu Received on Thu Aug 18 2005 - 20:55:55 CEST

Original text of this message