看到QueryPlan会有所帮助.
这可行吗?
SELECT m.* into #temp FROM tl_acxiomimport.dbo.tblacxiomlistings m inner join (SELECT RecordID, Rank() over (Partition BY BusinessName, latitude, longitude, Phone ORDER BY webaddress DESC, caption1 DESC, caption2 DESC ) AS Rank FROM tl_acxiomimport.dbo.tblacxiomlistings ) al on (al.RecordID = m.RecordID and al.Rank = 1) truncate table tl_acxiomimport.dbo.tblacxiomlistings insert into tl_acxiomimport.dbo.tblacxiomlistings select * from #temp