[1번]
select *
from table1 t1 inner join table2 t2
on t1.id = t2.id
where t1.id = 1 and t1.name = “테스트1”;
[2번]
select *
from table1 t1 inner join table2 t2
on t1.id = t2.id and t1.id = 1 and t1.name = “테스트1”;
[3번]
select *
from (select * from table1 where id = 1 and name = “테스트1” ) t1 inner join table2 t2
행을 줄여서 조인하면 속도가 더 빠를거 같다 생각해서
성능 테스트 시 3번이 제일 빨랐는데
그 이유를 잘 모르겠네요..
실행 순서가 FROM 이 먼저여서 일까요?
대량 데이터에서도 결과가 동일할 지 궁금합니다. ㅠㅠ