According to our lovely friends at Microsoft they say that after compacting a database the queries should be recompiled by opening each one then closing it. So I compacted the database I was currently working on and it was about 100 megs down to a mere 30 megs. I wrote a routine to cycle through and run each of my queries, I then watched it run lol (crapped out twice Hmmm). Looks like i need an external log to see which one it hangs on. Well after running most of the queries (and crashed lol) it is 45 megs O.K. I can deal with this I guess if it is for performance size isn't as big an issue.
My question is though according to the following article:
They mentioned several things about queries but I think they were vague. In the article they mentioned timing of a query.
Then later this.
So if we are opening the query to optimize it, we are doing so to update table statistics. Does this mean that we should open each query then scroll to the last record or is merely opening the query then closing it enough to fully compile it? Did I miss something in the article or are they just not very clear about this?
TIA
My question is though according to the following article:
They mentioned several things about queries but I think they were vague. In the article they mentioned timing of a query.
There are two significant time measurements for a Select query: • Time to display the first screen of data
• Time to obtain the last record
If a query returns only one screen of data, these two time measurements are the same. If a query returns many records, these time measurements can be very different.
• Time to obtain the last record
If a query returns only one screen of data, these two time measurements are the same. If a query returns many records, these time measurements can be very different.
After you compact your database, run each query to compile the query so that each query will now have the updated table statistics.
TIA
Comment