When I trying query with order by it works very slow. It takes 20-30seconds. Without order by about 1 second. Mysql version 5.5
SELECT distinct(product.id),
      product.position,
                   product.condition,
                   product.city_id,
                   product.price,
                   product.company_name,
                   product.timestamp_update,
                   product.company_id,
                   company.company_type,
                   company.image as company_image,
                   city.name as city_name
    FROM `product_to_tag` `v2t`
    JOIN `product` ON product.id = v2t.product_id
    JOIN `product_to_city` `vtc` ON product.id = vtc.product_id
    JOIN `city` `c` ON c.id = vtc.city_id
    LEFT JOIN `city` `city` ON city.id=product.city_id
    LEFT JOIN `company` ON company.id=product.company_id
    WHERE ((`product`.`publish` = 1)) AND (product.id !=  5016460) AND (c.id = 99 or c.parent_id = 99) AND ((`v2t`.`tag_id` IN (65, 181, 228, 1135)))
    ORDER BY `product`.`timestamp_update` DESC LIMIT 30;
 
    