Matt Velic

Data and Design

meme Monday August 2011

| 0 comments

Tom’s topic for the month of August is the worst code you’ve ever seen. I’ve got a doosey.

Back in January we were upgrading our donor database to a newer version as our vendor was about to stop support for what we had purchased. Not an uncommon scenario. What came as a surprise – or maybe it shouldn’t since this is a commercial product – was the one-two punch of bad design.

The developers felt the need to include an additional 40 or 50 columns on nearly every table. Junk columns. I’m sorry: I meant multi-purpose. Columns such as money1 through money10. String1 to string10. Date1 to date10. You get the idea. And every value NULL. So much wasted space, and all because a tiny percentage of users felt the need to store an additional 10 dates or 10 monetary units or 10 fixed-length character strings. Just awful.

Needless to say, after the upgrade our database performance tanked. Despite the “improvements” to the tables, actual improvements had been left out. The major tables were still clustered index-less. With the additional columns came additional nonclustered indices to cover them purposelessly. And as a third party product, there was nothing I could do to make it better. But I did leave the company’s consultant a bunch of tips and documentation he could take back to their developers to actually improve the product. I like to think that one day they just might.

Leave a Reply

Required fields are marked *.

*