select from / outer join / on / where 로 구분되는 구문에서 where 의 상태를 먼저 필터링할 것 같지만 그렇지 않다.
where
from 의 대상을 먼저 줄여주는 과정이 필요하다.
select * from (select * from xxx where 1=1 as yyy) outer join zzz on yyy.id = zzz.yyy_id where xxx.state = 'xxx'