Will the performance of a SQL server drastically degrade if the database is bigger than the RAM? Or does only the index have to fit in the memory? I know this is complex, but as a rule of thumb?
Will the performance of a SQL server drastically degrade if the database is bigger
Share
Yes, when indexes cant fit in the memory or when doing full table scans. Doing aggregate functions over data not in memory will also require many (and maybe random) disc reads.
For some benchmarks:
http://www.sql-server-performance.com/articles/per/large_data_operations_p7.aspx
There for, don’t expect the same performance if your db size > ram size.
Edit:
http://highscalability.com/ is full of examples like:
http://highscalability.com/blog/2010/5/3/mocospace-architecture-3-billion-mobile-page-views-a-month.html
Or here:
Even if the DB size is just 10% bigger than RAM size this test shows a 2.6 times drop in performance.
http://www.mysqlperformanceblog.com/2010/04/08/fast-ssd-or-more-memory/
Although, remember that this is for hot data, data that you want to query over and don’t can cache. If you can, you can easily live with significant less memory.