지금 무척이나 나름대로 해결하는데 노력을 해보는데 영 안되네요..
도움을 청합니다.
특정 id를 제외하고 쿼리를 돌리려 하는데,
not in 조건에 항목을 2개만 넣어도 쿼리가 빠른데,
다음과 같이 not in 조건에 항목을 4개 넣으니 응답이 전혀 없네요...
혹시나 해서 not in 조건을 2개씩 두개로 분할을 해도 역시 마찬가지이고요
select count(*) as cnt
from igt_document a,igt_docfolder b,igt_log c
where a.doc_yearmon=b.doc_yearmon and b.userlog_id=c.userlog_id
and a.doc_number=b.doc_number
and (c.userlog_type='3' or (c.userlog_type='6' and a.fax_page=1))
and b.folder_date> (sysdate-7)
and c.userlog_id not in ('유우머','01011','010112','0101113')
and a.doc_type='4';
|