2011-09-14

WSS3.0 EventCache超過百萬筆

應該是WSS的bug,
hotfix都上了還是踩到這個洞, 而且已經塞進去的資料也不會砍掉
所以手動來砍





While exists (SELECT TOP 1 * FROM eventcache where eventtype In(8192,1048576) AND EventTime < DATEADD(day, -5, GETUTCDATE()))
begin
DELETE eventcache 
FROM (SELECT TOP 100000 * FROM eventcache where eventtype In(8192,1048576) AND EventTime < DATEADD(day, -5, GETUTCDATE()) ) AS e1 
WHERE eventcache.id = e1.id 
End



引用來源

沒有留言: