I was tasked with optimizing a rather unpleasant stored procedure in the old system. Its searchable database and a new copy is generated every day, while many complex associations are de-normalized. No entries are made, only SELECT, so I decided that some light improvements could be made by making the entire database read-only and changing the recovery model to Simple.
To my great surprise, this did not help - at all! The stored procedure still takes the same time. If a fact, I was so surprised that I decided that I did it wrong!
My questions:
- Do I need to do anything other than setting Read-Only Database to true?
- Is it wrong to expect significant performance improvements by making the database read-only?
- The same goes for the recovery model: Shouldnt "Simple" have a noticeable effect?
- Are there other similar database configurations that can improve performance in this scenario?
The stored procedure is huge, with temporary tables, 40+ tables combined into 20+ queries. But Id like to optimize the database before I edit this process.
source
share