2
有没有一种方法可以优化按联接表的列排序?
这是我的慢查询: SELECT `products_counts`.`cid` FROM `products_counts` `products_counts` LEFT OUTER JOIN `products` `products` ON ( `products_counts`.`product_id` = `products`.`id` ) LEFT OUTER JOIN `trademarks` `trademark` ON ( `products`.`trademark_id` = `trademark`.`id` ) LEFT OUTER JOIN `suppliers` `supplier` ON ( `products_counts`.`supplier_id` = `supplier`.`id` ) WHERE `products_counts`.product_id IN (159, 572, 1075, 1102, 1145, 1162, 1660, 2355, …