Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
fqiao70
Yak Posting Veteran
52 Posts |
Posted - 2011-06-02 : 15:44:11
|
i have a sql query first time run, returns in 4 mins. then i run it again it returns back in 10 seconds. after a few hours, i rerun it again it takes 4 mins again...seems like sql server forgets after some time how it optimized the query? how do i make it run in 10 secs or less??Thanks |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
mmarovic
Aged Yak Warrior
518 Posts |
Posted - 2011-06-03 : 15:05:17
|
Actually sql server "forgets" your data, by not having them in data cache, so next time it has to load them from the disk again.MirkoMy blog: http://mirko-marovic-eng.blogspot.com/ |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|