A legacy ASP .NET application using Entity Framework faced performance issues due to misuse of ORM tools. The post discusses common ORM misuse patterns like N+1 queries, eager versus lazy loading, and lack of indexes. It provides examples using TypeORM with practical suggestions to improve performance, including prefetching data, avoiding unnecessary data loading, and optimizing database indexes.

13m read timeFrom thisdot.co
Post cover image
Table of contents
BackgroundOur Example DataN + 1 QueriesEager v Lazy LoadingDatabase Field Performance IssuesDatabase v. In-Memory FetchingLack of IndexesConclusion

Sort: