[OJS] User search very slow

Hello everyone,

Description of issue or problem I’m having:
My user search is terribly slow! Especially when searching for a specific user.
Searching directly in the database is much faster (command-line), but I noticed a few fake users registered with the same givenName. I’m not sure if those records are causing trouble in the query, but I can’t delete them directly without probably corrupting my database.

Steps I took leading up to the issue:
While I have direct access to the database, I can search required data. However, I need a solution to delete undesired users, faster than a merge as the search doesn’t end.
And I posted the problem here for a solution.

What I tried to resolve the issue:
Nothing yet.

Application Version - e.g., OJS 3.1.2:

Additional information, such as screenshots and error log messages if applicable:
First access to users list is quite fast.

Searching for any specific user, specially this Aurora doesn’t end!

Database search for givenName

Couple of fake users records

It is a very serious problem to be able to delete unnecessary users, spam users, unauthorized users. I hope someone finds a solution to this problem in 2022.

Please see:

Hello all,

Could HTML inside biography and signature fields, for example, break the search?

Some of this data may have com from previous versions and not necessarly cleaned or correc/valid HTML.

Hello @abadan ,

My version of classes/services/QueryBuilders/PKPUserQueryBuilder.php is very different…

 * @file classes/services/QueryBuilders/PKPUserQueryBuilder.php
 * Copyright (c) 2014-2021 Simon Fraser University
 * Copyright (c) 2000-2021 John Willinsky
 * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
 * @class PKPUserQueryBuilder
 * @ingroup query_builders
 * @brief Submission list Query builder

namespace PKP\Services\QueryBuilders;

use Illuminate\Database\Capsule\Manager as Capsule;
use PKP\Services\QueryBuilders\Interfaces\EntityQueryBuilderInterface;

class PKPUserQueryBuilder implements EntityQueryBuilderInterface {
Code version:
Database version:
Latest version:
Your system is up-to-date

Hello @ramon .

Yes, it looked like this in the original OJS 3.3.0-8:

And it looks like this after the updates that will come out in OJS 3.3.0-9: