如何在不知道表的情况下优化此查询?

时间:2017-10-19 20:48:10

标签: sql optimization

SELECT
    a.eid,
    a.cid,
    b.e_date
FROM RR_CHARITY a
JOIN RR_EVENTS b ON a.eid = b.eid
WHERE a.cid IN (
    SELECT cid 
    FROM RR_CHARITY_TRANSACTIONS
    WHERE `trnDate` <= '2013-01-01 00:00:00'
)
AND a.eid NOT IN(216,217,322);

0 个答案:

没有答案