You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume that each related table contains 10 records for the given id.
In version 2.2 a subquery was generated for each collection.
So 10 queries were executed which each returned 10 rows.
In the 3.0 pre-release a single query is generated with a left join for each related table.
Each left join will multiply the number of rows in the temporary result.
So if each related table contains 10 records for the given id, a temporary result of 10000000000 rows is created.
The issue
My MySql server cannot handle this.
On my machine MySql claims all available memory
My machine begins to swap memory.
Memory usage goes to 100%
Disk activity goes to 100%
My entire machine hangs.
Further technical details
MySQL version: 8.0.16
Operating system: Windows 10 Professional
Pomelo.EntityFrameworkCore.MySql version: 3.0.0-rc1.final
Microsoft.AspNetCore.App version: 3.0
See attached image which shows the memory usage development, immediately after the query is started:
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Consider the following query:
var result = await _dbContext.MainTable
.Include(m => m.Collection1)
.Include(m => m.Collection2)
.Include(m => m.Collection3)
.Include(m => m.Collection4)
.Include(m => m.Collection5)
.Include(m => m.Collection6)
.Include(m => m.Collection7)
.Include(m => m.Collection8)
.Include(m => m.Collection9)
.Include(m => m.Collection10)
.SingleOrDefaultAsync(m => m.Id == request.Id);
Assume that each related table contains 10 records for the given id.
In version 2.2 a subquery was generated for each collection.
So 10 queries were executed which each returned 10 rows.
In the 3.0 pre-release a single query is generated with a left join for each related table.
Each left join will multiply the number of rows in the temporary result.
So if each related table contains 10 records for the given id, a temporary result of 10000000000 rows is created.
The issue
My MySql server cannot handle this.
On my machine MySql claims all available memory
My machine begins to swap memory.
Memory usage goes to 100%
Disk activity goes to 100%
My entire machine hangs.
Further technical details
MySQL version: 8.0.16
Operating system: Windows 10 Professional
Pomelo.EntityFrameworkCore.MySql version: 3.0.0-rc1.final
Microsoft.AspNetCore.App version: 3.0
See attached image which shows the memory usage development, immediately after the query is started:
The text was updated successfully, but these errors were encountered: