Too many DISTINCT conditions is a symptom of complex spaghetti queries. Consider splitting up the complex query into many simpler queries, and reduce the number of DISTINCT conditions It is possible that the DISTINCT condition has no effect if a primary key column is part of the result set of columns