Liron Harel
Liron Harel

Reputation: 11247

In-memory vs Caching for an ASP.net application

My web application is using a SQL Server database that has around 2000 rows. I wanted to know if its better to load all the DB to the RAM (Store it in a static var) and query it using ASP.NET LINQ. I need it only for read operations. I think that the amount of RAM needed is not very high at all. I think it can speed up the application considerably.

I wanted to know if it's a good option, instead of caching the data?

Upvotes: 2

Views: 737

Answers (3)

Jammy
Jammy

Reputation: 21

you need a caching product when your database is huge in size and it becomes bottleneck as frequent trips to the DB to complete a request may result in performance decline. if the DB is of the size as you've mentioned, there is no need of it.

Upvotes: 0

rick schott
rick schott

Reputation: 21112

A database that small is already in memory on your server, no need to do it twice.

Upvotes: 2

Icarus
Icarus

Reputation: 63970

Looks Ok to me considering the details you have provided. The difference performance wise shouldn't be huge, though.

Upvotes: 1

Related Questions