不加ORDER BY t.CREATED_Date DESC查询需要2秒 加上后,查询需要15秒 如果单独查询一个rd_pro_inventory_temp表的话,加不加都是几毫米而已,这是为什么呀? SELECT t.LAST_UPD_BY, t.LAST_UPD_DATE, CASE WHEN t.ADD9 = 0 THEN det.item_code ELSE NULL END AS LOC_CODE, CASE WHEN t.ADD9 = 1 THEN det.item_code ELSE NULL END AS PRODUCT_CODE FROM rd_pro_inventory_temp t LEFT JOIN ( SELECT tem_desc, factory_code, GROUP_CONCAT(item_code) AS item_code FROM rd_pro_inventory_temp_det GROUP BY tem_desc, factory_code ) det ON det.tem_desc = t.TEM_DESC AND det.factory_code = t.FACTORY_CODE WHERE 1 = 1 AND t.active_flag = '1' AND t.FACTORY_CODE = '6640' ORDER BY t.CREATED_Date DESC