Well, after thinking I had my SQL problem licked, it came back. I finally got a callback from a support guy at Microsoft, and he had me update statistics on all the tables involved. That fixed things, and everything has been working now for the last couple of days. I'm pretty sure I'd updated statistics on all these tables at least once since the original problem occurred, but maybe I didn't, or maybe I just needed to do it two or three times to get everything back to normal.
I've always had a maintenance plan that updates statistics on all my tables once a week, and I don't think I've ever had problems with statistics before.
I've been reading up on this whole statistics thing now, which I admit I hadn't paid much attention to, until this little debacle. Here's a
blog entry by Kim Tripp that explains a few things about the auto-update mechanism, and
another one by someone at Microsoft that explains a good bit about the way statistics work in SQL 2005.
Labels: SQL, Windows