Index the crap out of it!

There’s something satisfying about seeing a particularly complicated database query’s execution time go from 0.7 seconds to 0.02 seconds. I’m working on a tricky report for a client whose database has tens of millions of rows, and I was becoming frustrated with the sluggish queries. So I sat down and started looking at the query, testing its performance, until I saw a couple of fields that I could index. I ran a few commands to do so, and BAM, it sped up by a factor of almost 40.

A wise man (I think it was Brian) once told me that the solution to most database query performance problems is to “index the crap out of it”. So true.

60 in February

I couldn’t let a sunny 60-degree day in February go to waste. I joined five die-hard friends in a game of Durango boot (a variation on ultimate) at lunchtime today. We played on a slushy, snowy field, and 15 minutes into the game none of us could feel our toes any more. But we were slipping and sliding and having a great time. Ahh, February in Colorado…

Hun

I thought there was some kind of law that says the only people who can call me “hun” are women over the age of 60. Coming from a matronly older woman, it’s kind of an endearing term. Coming from the 20-something sandwich artist at Subway today, it somehow seemed wrong.

Well, that escalated quickly.

Today I was driving and my tire pressure light came on. Sigh. It does this about every two weeks, and I drive over to the nearest gas station and fill up the tire again. It costs a dollar in quarters every time, but I figure it’s cheaper than buying a new tire.

I returned home, parked in the garage, and as I was heading into the house I heard a hissing sound. Looking more closely, it was that same tire… hissing as the air escaped at a steady rate. Sigh.

So I drove over to the local Tires Plus and asked them to plug it. They told me they’d call me with an update. A few minutes after I returned home, they called to say there was a huge nail in the tire and it wasn’t reparable. I’d have to replace the tire. Sigh.

Well, you never replace just one tire– you need to do at least a pair. I asked about that, and he said, “All of your tires are pretty much bald. You should replace all of them.” Since it’s winter, and in fact snowing pretty heavily today, I suppose it makes sense. So sure, go ahead and replace all four tires. Sigh.

“Oh, and by the way, your alignment is way off.” How much is that? Another $150 for an alignment today and for the rest of the lifetime of the car (actually not a bad deal). Without the alignment, the tires will wear unevenly and all sorts of other bad things. I suppose I also won’t be able to drive on I-70 through Kansas without touching the steering wheel. So sure, let’s align everything too. Sigh.

$800 later, I walked out of the shop. All because of a nail.

On a humorous note, “that escalated quickly” reminded me of the old “I saw a spider” meme:

there-was-a-spider-i-panicked