This is still a blocking query (since our entire sqlalchemy setup is not async), and we could technically run it in an executor with a separate session, but the query currently needs less than 20ms for ~100k users so it should not longer be noticeable in practice.
This is still a blocking query (since our entire sqlalchemy setup is not async), and we could technically run it in an executor with a separate session, but the query currently needs less than 20ms for ~100k users so it should not longer be noticeable in practice.