Hello Ethan,
You can see the exact sql used for this here: https://code.q2developer.com/Q2Antilles/q2-sdk/-/blob/develop/sdk/q2_sdk/sql_scripts/10-get_active_users_since.sql
Getting that number of users is going to be very expensive. I would recommend getting like 1000 at a time and then looping incrementing the page_number untill you get all the users which would be when it returns 0 rows back.
-Trey