Membership.GetAllUsers is slow

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
euph411
Posts: 5
Joined: Sun 24 Dec 2017 17:07

Membership.GetAllUsers is slow

Post by euph411 » 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.

Shalex
Site Admin
Posts: 8891
Joined: Thu 14 Aug 2008 12:44

Re: Membership.GetAllUsers is slow

Post by Shalex » Tue 05 Nov 2019 18:37

Thank you for the report. We will investigate the question and notify you about the result.

euph411
Posts: 5
Joined: Sun 24 Dec 2017 17:07

Re: Membership.GetAllUsers is slow

Post by euph411 » Wed 06 Nov 2019 22:13

Thank you. I confirmed the problem also occurs with 8.15.1504 and provided some additional information privately.

Post Reply