Information générale
Forum:
Microsoft SQL Server
Titre:
Slow, then fast queries
Our SQL server recently crashed so we had to bebuild everything and restore the data from backup. Everything went fine except now certain views with a filter will take from 30-120 seconds to run the first time and almost instantly thereafter, even under different sessions or logins. The same view with a different filter will take 30-120 seconds again. The first view will still return quick and the second one will be quick thereafter. After a few hours the first and second filters will take a long time again. These long queries will also nearly peg the server.
We did not have this problem before the crash. Is there a setting in SQL server or NT that may control this? We are currently running SQL 7 SP2 on NT 4.0 SP6a server. There is also 1GB RAM, 1GB pagefile, 400 Mhz dual PIII processors, 100 Mbs/Full duplex network connection.
The view code and table structure here are to complicated to try to replicate here, but I'm willing to try anything I can do. Besides, I don't think it is the views. I feel it is something to do with the cache or something in SQL7 or NT4.0.
When I get time to work on the server after work hours I will upgrade to SQL7 SP4 and hope for the best, but if anyone has any ideas, it sure would be appreciated!
I will answer any questions about this situation as best I can.
Thanks,
Don Adams
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement