Hence, this morning's excercise. I picked one query (used in four seperate reports which make up the statements we mail out every month), and spent a few hours unraveling it.
Even after the optimization I did a while back, this thing's got eight nested queries, pulling the full content of thirteen tables across the network. Seven of those tables are already loaded. Put another way, we're grabbing 1,636,964 pieces of information when there's really only 591,021. And it was easily twice that before - my predecessor seemed to value inefficiency in his designs.
I should be able to clear up those redundancies today, and that'll make things go a bit faster. And I'll pick another query to clean up tomorrow. But, the real speed increase will come in a few weeks, when that's all out of the way and I'm finally ready to abandon MS Access' stupid linked tables in favor of an ODBC server and SQL passthrough. Just dealing with one record at a time will reduce the rediculous (5-10 minute) load time on our "Enter/Edit Site Information" screen down to nothing (by a factor of 2579. 156 values transfer faster than 402,324).
...then they can fire me.
See, I'm only indespensible in my ability to make myself obsolete.
Which, I'll grant you is a fairly negative way to look at things. But I think that's the scope of this career path. People need me to come in and make it so they don't need me. I'll never have any sort of job security, but I won't hurt for employment either, as it turns out not needing me is highly in demand.
'course, this might all be the migrane talking.