There is a problem, there is a database which contains users (users installed the app Vkontakte, to be exact) as a Primary key ispolzuetsa user id in the social network, which can be considered a random number. Need to select from the database one random user. The user base a lot so order by rand() too expensive to use to generate a random number and select the record with the same id also not work, given that id go out of order. How to be in this situation? And at the same time, what if you need a few random users?