nyeates wrote:
> I think it runs immediatly, though I have seen it not run (or not finish and 
> not commit?) when there are large numbers of historical rows.... say 
> millions. This is just too many rows and so you can go in on the backend of 
> the machine
> 
> mysql (get to the mysql prompt)
> use events;
> DELETE FROM history WHERE stateChange < DATE_SUB(NOW(), INTERVAL 90 DAY);
> 
> You might want to test that with a select first, I have not tested the above


You could better perform a query on the 'firstTime' or 'lastTime' columns, 
since those columns have indexes. A simple SELECT query for min(firstTime) is 
magnitudes faster than a min(stateChange). 

I'm not sure how Zenoss handles the purging internally, but I really hope they 
do the delete queries on indexed columns. 

I just deleted about a million old events with a 'DELETE FROM history WHERE 
firstTime < 1230789600' in under 3 minutes.




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=39069#39069

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
zenoss-users@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to