optimize query request, generate random requst