DSEN-8537 added a timeout and memory cap on queries
Despite the users table spec saying that uid is an index, the Windows implementation of that table doesn't support that column to be an index and so it doesn't optimize the query based on it.
When a column is an index and a JOIN is done on it, what is expected is that the table will do an optimization and only search and return that column value. For each row to JOIN, sqlite will call the table row generation, so it has to be fast. Instead here every time the table generation code is called, all the users are retrieved and almost all then discarded later by sqlite, because only one uid is really needed.