UserSelectQueryBuilder::registered (L183 of UserSelectQueryBuilder) is implemented by adding the where condition actor_user != 0 to the query builder. However, while this works in theory, the actor_user column either stores a value of NULL or an integer greater or equal to than 1.
While mariadb seems to be able to handle this difference, testing on the commonswiki DB suggests that the query is slower by about 0.2 seconds when using 0 to compare instead of NULL.