New answers tagged explain
First, please remove the parentheses from DISTINCT(reservations.id). DISTINCT is not a function. About performance, why do you join reservation_nights? You only seem to use that table in the ORDER BY. Assuming that a reservation can span several nights, you probably mean to use the last date (from the many that a reservation has) for the ordering and ...
Top 50 recent answers are included