나는 쿼리가 아래의 쿼리는 5 분 이상 걸리고 있습니다 :다른 실행 시간 SQL 서버
If(Select a from tbl_abc where id in (select id from tbl_xyz where mainid = 12))
BEGIN
-- CREATE TEMPORARY TABLE [Say: #temp1]
#temp1 => Select a from tbl_abc where id in (select id from tbl_xyz where mainid = 12)
inserting the same value in the temp table
drop #temp1
END
어떤 이유가있을 수 있습니까? 어떻게 해결할 수 있습니까? 나는
왜 IF 문입니까? 너 뭐하려고? – gbn
쿼리 계획과 io/cpu 통계를 확인 했습니까? – sisve
같은 문제에 직면 한 사람들 : 두 가지 답변 [by : binil & by : gbn]이 나를 위해 일했습니다. – Zerotoinfinity