Improve DISTINCT ON