Use limit in DB query