実行に時間がかかるクエリがあります。各テーブルのインデックスをいじってみましたが、まだ時間がかかります。このクエリを最適化する他の方法はありますか?
SELECT tblDLM.Phone
FROM (SELECT Table1.Phone,
Count(Table_1.T1ID) AS CountOfT1ID
FROM Table_1
INNER JOIN Table_2
ON Table_1.SubscriptionID = Table_2.SubscriptionID
WHERE ( ( Table_1.MsgType ) = 'coupon' )
AND (( ( Table_1.Phone ) IN (SELECT DISTINCT Table_3.Phone
FROM Table_3
WHERE Table_3.DeliveryStatus <> 0
AND Table1.Phone = Table_3.Phone)
AND CampaignID <> Cast(@intCampaignIDTemp AS NVARCHAR(50)) ))
GROUP BY Table_1.Phone,
Table_2.MasterServiceID
HAVING Table_2.MasterServiceID = 121) tblDLM
WHERE CountOfT1ID >= 3
ありがとう。