Quick, call Microsoft!
For about a week now a member of our team has been helping a customer with some query tuning. We have examined a lot of pieces to the puzzle, but it all boils down to this:
- Same query
- Two different version of the database
- Same server
- One query runs in seconds, the other takes minutes
“It is the same query, against the same server, but different results. Clearly there is something wrong with the database and/or the server. How quickly can we get Microsoft involved for a resolution?”
Uh…not quickly. Not quickly at all. I would rather not call them and waste their time until after you verify the data and schema (which they had not). So, we asked for someone to give us a list of objects involved in the queries (we knew them, but we wanted a complete list anyway). We identified one table that had a different rowcount in the two databases. In one database it had 500 rows. In the other, it had 400,000 rows. Guess which query was running faster?
Yeah, I really want to call Microsoft and get them involved as to what the problem is with this query. I wonder what their first question will be. Hmmm. Could it be about data, or schemas?