Linq-to-SQL and performance

Hi

I am developing an asp.net mvc site with linq-to-sql, we have 1000 concurrent users, and we are having performance issues.

I found that stackovewflow is also built on linq-to-sql? So who knows how they improved performance.

The low performance was good, each page loads in 3 seconds, but after switching to linq according to our client needs, the page arrives in 8-10 seconds, which is unacceptable.

Our HTML is very clear, but we have very complex database operations.

The best answer would be any advice or code.

Thanks in advance,

+4
source share
3 answers

I answered a similar question about this the other day. These are examples of how they worked well on stack overflows:

http://www.codinghorror.com/blog/2009/06/all-abstractions-are-failed-abstractions.html

and

http://www.codinghorror.com/blog/2010/03/compiled-or-bust.html

+1
source

I would recommend looking at the queries created by LINQ, especially complex ones, and starting them manually, capturing the slow ones, optimizing them manually and trying to translate them back to LINQ.

Probably a slow and painful, but the best way to do this, I think LINQ to SQL is skipping, but it cannot defeat the optimized query manually, maybe something is here, and it prevents the use of SQL server indexes, etc. etc..

+3
source

Are your database queries being executed fast enough - do you need to view your indexes?

Do you use caching where possible to hit the database less?

+1
source

Source: https://habr.com/ru/post/1309179/


All Articles