You could use DISTINCT to avoid duplicates and to avoid time-out you could filter on the table with a date range if you have any cols storing date range