What a difference an index makes!

I made some changes to my FAA data loader script and ran it. Four days later it had finished running, I discovered a few bugs, and was getting ready to run it again, but I decided to see if I could improve the speed any. I’d already run the perl profiler and discovered that 95% of the time was spent in mysql. So I tried doing an “EXPLAIN” on all the queries. That’s when I discovered that one very common query was doing the dreaded “ALL” query on a 12,000 row table as step 1. Hmmm. That table isn’t even an important one, it was just table joined to the main “waypoint” table to get one field that was semi-useful. The query has a “waypoint.datasource_key = ?” in it, why isn’t it doing that first? “DESCRIBE TABLE waypoint;” showed me the error of my ways – I’d forgotten to put an index on “datasource_key”.

So I created the index and started the script before going to bed. I was astonished to discover that the script was done this morning. According to my Munin graphs, it had only taken about 6 hours to run. 96 hours down to 6 hours. Yeah, that’s a worthwhile optimization.

Fun fact #143.4

Discovered while trying to debug my nav data loading scripts: The Hendersonville Airport (0A7) and the “W.N.C. Museum Airport” (8NC9) are only 0.03 nautical miles apart, but they’re separate airports. I’m not sure if they’re the closest two ever, but they’re certainly pretty damn close. As a matter of fact, I think this picture Hendersonville Airport from the AirNav.com web site listing for Hendersonville shows both runways, the paved one for Hendersonville and the turf one for the museum. I bet there is a story why they didn’t just build a taxiway between them and call it one airport.

I must have left my mind reading device in my other pants

The founder of the flying club is not the sharpest knife in the drawer when it comes to using technology. He just sent an email to the entire club with the subject line “Advertising” and the text “$82,000” followed by his name and a AOL banner. Now, unlike most of the club, I know he’s involved in trying to sell the club’s Lance, so I have a bare inkling of what he might possibly mean, but even I’m scratching my head wondering what the fuck he’s talking about. I wonder if that’s his asking price or an offer we’ve received or the reserve he’s going to eBay it under or what.

Personally, I think that there’s no way in hell we’ll get $82K for a 1977 Lance with a clapped out engine (2480 hours+) and prop and ancient avionics. But I suppose one can live in hope. Looking at Trade-a-Plane I can see a 1976 Lance with less TTAF (Total Time on Airframe) with only 875 hours on the engine and prop, and they’re asking $80K.

“Anticipated Separation”? I don’t like it.

The mission was to get two planes back from Batavia, one of which was the Lance. We tried on Friday and Saturday and Sunday, but the weather didn’t cooperate. The weather was fine today, but only two of us could make it, so we only managed to bring back the Lance.
Continue reading ““Anticipated Separation”? I don’t like it.”

Hold me, I’m scared!

A few weeks ago we had a “lessons learned” session where all the developers, QA people and field circus engineers got to talk about why development cycles are getting longer, we’re finding more and more bugs, and people are getting more disgruntled. It was amazing how many people thought that what we really need are clear requirements that don’t change from day to day, proper development methodologies, design review meetings, code reviews, etc. At the end of the meeting, our boss’s boss came into the meeting and the meeting facilitator gave him a precis of what was going to be in his report. On the way out of the meeting, a developer who is just as experienced and cynical as I turned to one of our younger colleagues and said “You realize that now that we’ve had the meeting and had a chance to vent, management will think the problem is fixed”.
Continue reading “Hold me, I’m scared!”