Some comments: - instead of the regex approach, I used a combination of right()-left(). It is less elegant and less flexible, but faster; - I first split on gender and then looked for the most frequent name; this should also be faster; - in the end my solution was some 3 times faster than the "official" solution.