EXISTS
-
튜닝 예시 #1Logical 2021. 7. 23. 15:51
속도개선 : 1303ms → 23ms -- 원본쿼리 select count(*) from ( select o.userid from 주문 o , ( select userid from 배송 d where d.배송일자코드='20210702_1555' and d.userid not in (N'koukann',N'd_press',N'rakuten1234',N'amazon1234',N'sunbuy1') group by userid ) a where o.주문상태='4' and o.userid = a.userid Collate Japanese_CI_AI and convert(varchar(10),o.결제일시,121)0 ) b; -- 2035 -- CPU 시간 = 1297ms, 경과 시간 = 1303ms -- 약 132..