日期:2014-05-16 浏览次数:20776 次
--LockCheckin中的shipid,LockCheckinid建立聯合索引 --ship中的shipid建立索引 --SCHEDULEEXECS中的LockCheckinid建立索引 --這些只是為了測試速度,測完後再恢復為你之前的 select l.shipid, l.shiplockid, l.upordown, s.shipspeed from LockCheckin l, ship s where l.shipid=s.shipid(+) and not exists (select 1 from SCHEDULEEXECS where SCHEDULEEXECS.LockCheckinid=l.LockCheckinid) order by shiplockid