下面是我要修改的查询,每天执行超过3万次,我们不知道如何修改,有人可以帮助我解决这个问题。
insert into #ALERT_AND_BUSINESSES_IDS
select
AlertID,
BusinessID = c.value('.','bigint')
from Alerts
cross apply
XMLBusinessIDs.nodes('/root/id') as m(c)
where Active = 1