Which is better ... memory search or database access?

We are currently working on an online system, and I am confused about how to use the search in memory and when to use the search in the database. Can someone please help me figure out the factors to consider when it comes to finding records?

+5
source share
3 answers

One of the factors is that if you need to repeat the same results over and over, be sure to cache them in memory. This becomes a problem when using linq-to-sql or Entity Framework-ORM, which support deferred execution.

, IQueryable<SomeType>, , , ToList() foreach.

+4

. , , . , , .

, .

, ...

+2

, , .

, , , , , .

( ), , , , .

, , LINQ, , .

, - : , , , , . , ...

, ...

+2

All Articles