Membership.GetAllUsers is slow
Posted: Sat 02 Nov 2019 16:18
Hi,
We are running dotConnect for MySql against a large database (approximately 1 million users).
We keep seeing dotConnect calls showing up in our slow query log.
For example consider:
Membership.GetAllUsers(0, 1, out var totalRecords);
It should return a single record and be fast. Instead, it takes *9+ seconds* because it scans a significant amount of the table due to suboptimal SQL.
We have analyzed the query and made an equivalent, better one that returns in *0.02 seconds*.
I will send our analysis and recommendation to you privately, but I wanted to document the issue so you have context.
Note that we are running against version 8.13.1437 against MariaDB 10.4.8. We'll check the latest dotConnect too, but the release logs do not show any recent changes in the Membership provider.
Thank you.
We are running dotConnect for MySql against a large database (approximately 1 million users).
We keep seeing dotConnect calls showing up in our slow query log.
For example consider:
Membership.GetAllUsers(0, 1, out var totalRecords);
It should return a single record and be fast. Instead, it takes *9+ seconds* because it scans a significant amount of the table due to suboptimal SQL.
We have analyzed the query and made an equivalent, better one that returns in *0.02 seconds*.
I will send our analysis and recommendation to you privately, but I wanted to document the issue so you have context.
Note that we are running against version 8.13.1437 against MariaDB 10.4.8. We'll check the latest dotConnect too, but the release logs do not show any recent changes in the Membership provider.
Thank you.