|
|
Thursday, November 06, 2003 |
How not to get rich as a consultant
I looked for it today, but couldn't find on the web, an anecdote I
remember about Dashiell Hammett. The way I remember it was that he was
working for the Pinkerton's in San Francisco in the mid-20s. There was,
I think, a jewel theft, and it was known that the thief was on a ship
bound for Australia, due to sail immediately. Hammett was assigned the
case, and had a ticket to take the trip to Australia. Instead, he
caught the thief before the ship left port. Disgusted with himself for
not getting the trip, he quit.
I felt a bit like that today. I've been doing some SQL Server
consulting in San Francisco off and on, helping with some data import
checking, something that I've always been really good at. This week
they asked me to come and help with an optimization problem. They had
three related queries and they were taking too long to run: 11, 13, and
9 minutes. The programmer, and old friend of mine, was too busy with
other stuff to put the time into optimizing it. He showed me the thing:
a "between" where clause wasn't using the index on the date field,
instead of doing an index seek, it was doing a scan, eating up
resources. So I pulled the relevant code out of the stored procedure,
and did some tests. I also did some poking around on Google, and
remembered that you could give "hints" to TSQL to force it to use an
index. Sure enough, adding about 15 characters to the stored
procedures, and the job was done: from 11, 13, and 9 minutes, the
queries went down to about one and a half, three and a half minutes,
and 19 seconds. Jeez. Trouble is, it took me about an hour and a half
to do this, and I made the mistake of showing it to everyone. So
instead of perhaps a day's worth of work, or even two, I had the
problem solved, the solution documented and tested, and the production
copies of the stored procedures updated right after lunch.
I guess I won't get rich as a consultant, but it's fun to get a bit
lucky and zoom right in on a fix for what might have been a sticky
problem.
7:22:22 PM Permalink
|
|
Dean Calls for Humans to Mars. The Mars Society reports (proudly, no doubt) that during an online national town meeting conducted by the Washington Post and Concord Monitor, Democratic presidental hopeful Howard Dean today called for the United States to launch a humans to Mars... [Martian Soil]
Maybe those guys with Confederate flags?
6:04:28 PM Permalink
|
|
© Copyright 2004 Steve Michel.
|
|
|
|
|