-2
누군가가 이러한 쿼리 중 더 효율적인 것이 무엇인지 설명 할 수 있는지 또는 동일한 쿼리를 수행 할 수 있는지 궁금합니다.쿼리 효율 - 성능이 더 좋습니까?
모든 의견에 감사드립니다.
쿼리 # 1 :
select
col_1, col_2
from
tableA
join
(select
col_1, col_2
from
tableB
where
col_2 > X and col_2 < Y) subQueryB on tableA.col_1 = subQueryB.col_1
쿼리 # 2 :
select
col_1, col_2
from
tableA
join
tableB on tableA.col_1 = tableB.col_1
where
tableB.col_2 > X and tableB.col_2 < Y
쿼리가 모호하게 보입니다. 어떤 테이블의 'col_1'과'col_2'가 리턴되고 있습니까? – hatchet
알아내는 가장 좋은 방법은 시도하는 것입니다. – hatchet