Page 1 of 1

Membership.GetAllUsers is slow

Posted: Sat 02 Nov 2019 16:18
by euph411

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.

Re: Membership.GetAllUsers is slow

Posted: Tue 05 Nov 2019 18:37
by Shalex
Thank you for the report. We will investigate the question and notify you about the result.

Re: Membership.GetAllUsers is slow

Posted: Wed 06 Nov 2019 22:13
by euph411
Thank you. I confirmed the problem also occurs with 8.15.1504 and provided some additional information privately.

Re: Membership.GetAllUsers is slow

Posted: Mon 23 Dec 2019 21:41
by athetoma
Thank you very much! If this solves my problem, I will be happy, because I’m looking for a solution all the day!