How to optimize a "select distinct" across three tables, 40k rows, that only returns 22 results.
How to optimize a slow "select distinct" query across three tables, 40k rows, that only returns 22 results.