Both part 1 and part 2 can be test on server.
However, because I'm using free Heroku server I did not populate the database with 10 million users. Instead I populate it with 10k.
But the program can handle 10 million which I tested on my local server. Feel free to download the source and test the query speed with 10 million rows.