Aidan O'Brien became the most successful Investec Derby-winning trainer of all time while he enjoyed an eighth victory in the premier Classic.