Membership.GetAllUsers is slow
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.