Shit, Meet Fan

It’s been a quiet couple of days here on D4D™, and with good reason.

On Thursday, the database at work died in spectacular fashion. It’s been getting shaky for a while, but this week it keeled over totally, and since then I’ve been putting in silly hours getting things back to something approaching usable.

The problems are many, but basically the entire site – user-facing and company-facing – is database-driven. Without the database, there’s no business. It just grinds to a halt. So it’s been a case of “fix the essential bits, deal with the rest later”.

The other main problem is that the database was originally written as a proof-of-concept, a basic thing that’s then been extended and extended. Think of the original as a bungalow. The current site, all built off that bungalow, is the size of an airport, and all balanced on the roof of that original bungalow.

Because it wasn’t written with “the big picture” in mind, some of it is downright fucking nasty- and I suspect the original developer was also learning as he went along. For example, there were no date columns in there ’til I came along – instead it all used some very dodgy string-handling to figure out dates.

One of the main tables in the database now has 170,000 records in it. Which (in the database scheme of things) is nothing. Well, until you realise that each of those 170,000 records has 180 fields in it. That one database table is 600Mb in size. Oops.

So the last couple of days have been spent in Database Intensive Care. I’m through the brunt of it now, but it’s meant that other things – food, sleep, relaxation, D4D™ – have taken a back seat. I’m still going to be working on stuff around this for the next week, but things should be a bit calmer now that the urgent repairs are done, and it’s now more a case of fixing the underlying issues.

Thank fuck my assessment isn’t next week.



Leave a Reply

Your email address will not be published. Required fields are marked *