Gracias! Efectivamente trabaja mucho más rápido, tarda ~20s, lo cuál tampoco es muy aceptable. Pero me di cuenta (por mi poco conocimiento en bases de datos y SQL) de otra manera de hacerlo.
Código MySQL:
Ver original auctions_flight.id,
destinations.code
as destination_code
, destinations.name
as destination
, MAX(auctions_flight.num_seating
) as num_seating
, auctions_flightprice.Price,
MIN(auctions_flightprice.Price
) as price
auctions_flight
auctions_flightprice
ON auctions_flight.price_id
= auctions_flightprice.id
locations_location
AS origins
ON auctions_flight.origin_location_id
= origins.id
locations_location
AS destinations
ON auctions_flight.destination_location_id
= destinations.id
auctions_flight.num_seating >= 3
AND auctions_flightprice.currency
= 'MXN' GROUP BY auctions_flight.
date , auctions_flight.destination_location_id
, auctions_flight.origin_location_id
Y hasta ahora funciona adecuadamente y a buen tiempo ~0.1s.
Saludos