Inflearn brand logo image
Inflearn brand logo image
Inflearn brand logo image
Programming

/

Database

Entity Framework Core DB Performance Tuning (for SQL Server)

When implementing database programming with .NET Entity Framework Core, you can learn how to understand DB and query performance issues and improve them to achieve better performance and more stable EF Core programming.

(5.0) 8 reviews

74 learners

  • sqlexpert
데이터베이스
sql
.net
efcore
.NET
EF Core

Reviews from Early Learners

What you will learn!

  • EF Core DB Model Performance Considerations

  • Learn about performance issues and solutions for EF Core auto-generated queries

  • Learn EF Core and SQL Server features needed to improve DB performance

Performance tuning based on .NET EF/EF Core,
More stable & more powerful!

More powerful .NET development,
The key is in the query!

“Not all queries generated by EF Core are well-formed.”

In many cases, queries automatically generated or processed by applications using .NET EF or EF Core (or similar ORM environments) are not appropriate for SQL Server, impacting database or query performance . This is especially true for data changes and transaction processing. Furthermore, database administrators often complain about the difficulty of managing queries, such as query tracking and modification.

How to tune DB programming performance based on .NET Entity Framework Core

In this lecture, we will understand the current performance issues and share solutions to implement EF Core, a great programming tool for .NET developers, with better query performance and more stable processing methods. We will also introduce the improved features of the latest version (V7).


To these people
I recommend it.

.NET developer

EF Core Developer
or user

EF or EF Core
Operating in an environment
system administrator

DB performance of EF Core
Interested Users

💬 “I’m new to .NET development and this is my first time with EF Core. Can I still take this course?”

If you have experience with .NET and EF Core, you'll find the content easier to understand. However, for those new to EF Core, we've also included some helpful learning materials . It's recommended that you review these pre-learning materials beforehand to gain a deeper understanding. Furthermore, the example project is a console application, making it relatively easy to access.

💬 “Will there be differences depending on the EF Core version?”

The materials and demos cover EF5 through the recent EF7 , showcasing the improvements and differences between the new versions, so you can easily navigate them. For key features, we've included introductory versions to help you make informed decisions.


A self that has grown one step further
You can meet.

You can program EF Core to generate more performant, appropriate queries .

EF Core can implement Insert/Update/Delete, transactions , and locking more reliably .

You can discuss queries that are expected to have performance issues with DB managers, related departments, and practitioners to prevent problems .

SQL Server query tracing

Set operations and distinct handling

💡 Know-how to resolve query performance issues essential for practical development

Depending on how .NET EF Core is implemented or the form of Lambda/LINQ expressions , the type of automatically generated query varies, which affects query performance and database performance . In this training, you can examine the contents of automatically generated queries according to the EF Core implementation, performance issues, and learn methods to resolve them. You will also understand important problems that arise in practice due to data modification (DML) operations or transaction processing issues.

In particular, the knowledge sharer, who has been consulting and teaching SQL Server for a long time, uses common situations that appear in practice as examples for each topic, so it is organized to be directly helpful for practical application.

Detailed Curriculum ✅

1) Course Introduction

  1. Intro
  2. Pre-learning materials for beginners
  3. Course Introduction
  4. Introducing SalesSimple DB for Demo
  5. Introducing the Visual Studio Demo Project
  6. Visual Studio Configuration Demo and LINQ Expressions (Beginner)
  7. Key Elements of DB Performance Tuning

2) Code-First Performance Considerations

  1. Database property tuning
  2. Data format and length
  3. Specify a composite key or index
  4. Create an index when specifying a foreign (reference) key

3) Query logging and performance monitoring

  1. Tools for query performance monitoring and analysis
  2. Simple Logging
  3. SQL Server query tracing
  4. Dotnet-counters
  5. BenchmarkDotNet
  6. Overview of Data Access Procedures - Query Response Time (T) Consumption Items

4) DB Connection

  1. Connection String Important Items
  2. DbContextOptionsBuilder
  3. DbContextPool
  4. Understanding DB Connection Open and Close Points
  5. Multiple Active ResultSets (MARS) connections

5) Data Retrieval - Part 1

  1. introduction
  2. Synchronous vs. Asynchronous Processing
  3. Ad hoc vs. parameter queries
  4. ToQueryString()
  5. Non-tracking queries
  6. SELECT only the necessary columns (Projection)
  7. Benchmark - Performance by Data Retrieval Method
  8. IQueryable vs. IEnumerable
  9. Where(), Find(), First() vs. FirstOrDefault(), SingleOrDefault()
  10. FirstOrDefault()/SingleOrDefault() and Subquery Issues
  11. SingleOrDefault() and SQL LIKE implementation examples
  12. Using EF.Functions, SQL IN Conditions, and the STRING_AGG() Function

6) Data Retrieval - Part 2

  1. CROSS/INNER/OUTER JOIN
  2. APPLY implementation
  3. .Include(), .ThenInclude(), Split Queries, and EF Internal Buffering
  4. Lazy Loading vs. Eager Loading and Avoiding Unnecessary Duplicate Queries
  5. Set operations (intersection/union/difference) and distinct handling

7) Data Retrieval - Part 3

  1. Prerequisites for using the index SARG
  2. Understanding Non-SARG Types

8) Advanced queries and more

  1. Paging query
  2. Dynamic search condition (aka universal lookup) query
  3. Compile Query
  4. Stopping an asynchronous query
  5. Annotating queries with .Tag()

9) Direct use of SQL

  1. Classification of functions that support direct use of SQL
  2. Adhoc or Parameterization query
  3. Calling table-valued functions (TVFs)
  4. Calling a scalar type (non-entity) query
  5. Entity-based stored procedure call
  6. Calling a stored procedure for querying
  7. Calling a stored procedure that returns multiple result sets

10) DML operations (INSERT/UPDATE/DELETE), EF 6 vs. EF7

  1. Single or Batch INSERT
  2. Bulk data changes and batch processing
  3. Improved SaveChanges() in EF Core 7
  4. Single or Batch UPDATE
  5. Single or Batch DELETE
  6. ExecuteUpdate() or ExecuteDelete() for bulk updates
  7. Direct use of UPDATE or DELETE statements

11) Transactions and Locks

  1. Transaction processing considering DB performance
  2. Transactions, isolation levels, Commit/Rollback/SavePoint
  3. Read Committed Isolation Level and Lock Blocking
  4. Repeatable Read isolation level
  5. Dormant Transaction Problem
  6. Case Study – “Dormant Transaction” Performance Issues
  7. Avoiding blocking in read-only queries (NOLOCK or RCS)

12) Distributed Transaction (TransactionScope)

  1. TransactionScope class performance issues, remediation, and management

13) Appendix

  1. Calling scalar-valued user-defined functions (UDFs)
  2. EF Core Optimistic Concurrency Support
  3. Inheriting DbCommandInterceptor – Adding Hints to Queries
  4. Setting query hints without modifying application code

Q&A 💬

Q. Is this a course that non-majors can also take?

If you have a basic understanding of .NET and SQL, you can take this course. Even if you lack a little bit, you can study the necessary basics while taking the course.

Q. Is there anything I need to prepare before attending the lecture?

If you're new to .NET EF Core, review and follow the pre-study materials introduced at the beginning of the course. You can also download other materials, including a demo database and an EF Core sample project, in advance. The demo database configuration and content will be explained during the training. You'll also need SQL Server for use as a database, as well as management tools like SSMS, so please install them in advance.

Q. Are there any requirements I need to meet before taking the course?

You'll need Visual Studio (Community Edition or higher) and SQL Server. The latest version is recommended. For .NET beginners, we'll also provide a brief introduction and demonstration of downloading and configuring Visual Studio earlier in the course.


The knowledge sharer of this lecture
Introducing.

Kim Jeong-seon SQL

History

  • CEO/Director of Sequlo Co., Ltd. (www.sqlroad.com) (since 2005)
    • SQL Server consulting, technical support, lectures, and solution development
  • Development of SQLBigEyes (SQL Server performance monitoring solution, www.sqlbigeyes.com)
    • Development of SQLBigEyes (SQL Server performance monitoring solution, www.sqlbigeyes.com)
  • Microsoft Data Platform MVP
    • Awarded for 21 years since 2002 (as of 2022), MVP Achievement Award in 2008

Qualifications and Certifications

  • MCT, Azure DBA, MCITP, and many more

Lecture activities (since 1999)

Outside activities

  • Co-author of SQL Server MVP Deep Dives Vol 2 (Manning Pubs)
  • Kim Jeong-seon's SQL Server Consulting Story Season 12 is ongoing.
  • SQL Unplugged Seminars Held for 5 Years
  • SQL PASS Korea Chapter Leader
  • Speaker participation in Microsoft Ignite, BITEC, Tech Camp, MVP Camp, TechEd, MSDN, etc.

A good lecture to watch together

Recommended for
these people

Who is this course right for?

  • EF Core or EF Developer

  • DB Operator (SQL Server) with EF Core Application

  • Users interested in EF Core DB performance

Need to know before starting?

  • .NET EF Core Basics

  • SQL Server Basics

Hello
This is

1,655

Learners

134

Reviews

61

Answers

4.7

Rating

4

Courses

(주)씨퀄로 대표컨설턴트/이사, SQLBigEyes Monitoring Solution Developer
Microsoft Data Platform MVP (Award, 2002 ~ 현재)
MCT, Azure DBA, MCITP, MCDBA
SQL PASS Korea Chapter Leader

Email: jskim@sqlroad.com
Homepage: www.visualdb.net (인프런 쿠폰 코드 제공)
Youtube: 김정선 SQL TV
강의: 스킬서포트교육센터@서울

Curriculum

All

71 lectures ∙ (14hr 35min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

All

8 reviews

5.0

8 reviews

  • soondai3903님의 프로필 이미지
    soondai3903

    Reviews 2

    Average Rating 5.0

    5

    31% enrolled

    You explain things very well.

    • sqlexpert
      Instructor

      Hello soondai, thank you for leaving such a good review and feedback~ Best regards, Kim Jeong-seon

  • njh88102830님의 프로필 이미지
    njh88102830

    Reviews 8

    Average Rating 5.0

    5

    100% enrolled

    • b1246268090님의 프로필 이미지
      b1246268090

      Reviews 3

      Average Rating 5.0

      5

      42% enrolled

      • pnehanol6503님의 프로필 이미지
        pnehanol6503

        Reviews 4

        Average Rating 5.0

        5

        100% enrolled

        • mook45062146님의 프로필 이미지
          mook45062146

          Reviews 8

          Average Rating 5.0

          5

          49% enrolled

          This is exactly the lecture I was looking for. Thank you.

          • sqlexpert
            Instructor

            Hello mook4506, Thank you for leaving a review. Please recommend it to those around you~ :D Dream of Kim Jeong-seon

        Limited time deal ends in 7 days

        $102.30

        19%

        $127.60

        sqlexpert's other courses

        Check out other courses by the instructor!

        Similar courses

        Explore other courses in the same field!