ASP.NET Core on Linux with big performance issues using EF

I wrote a web application with ASP.NET Core MVC using the Entity Framework kernel with SQL Server 2016. Everything works with high performance while I host the website on Windows (IIS).

I recently tried to publish an application on my root server running Centos 7.3 with SQL Server 2016 (v.Next CTP 1.4) and .net core 1.1.

Unfortunately, the following code is causing a serious problem:

return _context.StockData
            .Include(i => i.Stock).ThenInclude(i => i.StockIndex)
            .Where(w => w.Date == date)
            .AsNoTracking()
            .ToList();
  • Windows 10 + MSSQL (remote on the root server): 36 ms
  • Centos 7.3 + MSSQL (local on the root server): 40 seconds (!)

Note. The StockData table has about 120 thousand rows, the table has about 1 thousand rows, and StockIndex has only 10 rows

SQL Profiler SQL Profiler 2 Win10, 2 - , Linux.

, db-, "" db #. , ?

!

+4

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


All Articles